package com.aspose.cells;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;

final class zbq {
   private static int a = 34;
   private static double b = 1.0E-10D;

   static void a(zn var0, zbo var1, com.aspose.cells.b.a.b.zp var2, boolean var3, zbcp var4) {
      if (!zbuk.a(var2)) {
         if (var1.s().e() || var1.u().e()) {
            boolean var5 = false;
            int var29;
            if (var3) {
               if (var1.d() != 0 && var1.d() != 2) {
                  var29 = var2.e();
               } else {
                  var29 = var2.f();
               }
            } else if (var1.d() != 0 && var1.d() != 2) {
               var29 = var2.f();
            } else {
               var29 = var2.e();
            }

            double var6 = 0.0D;
            boolean var8 = var1.k() == 2 && (var1.d() == 0 || var1.d() == 2);
            double var9 = var1.n() ? zbuk.e(var1.z()) : var1.z();
            double var15 = var1.n() ? zbuk.e(var1.x()) : var1.x();
            double var11;
            double var13;
            if (var4.av() || var1.d() != 0 && var1.d() != 2) {
               var11 = var1.n() ? zbuk.e(var1.z()) : var1.z();
               var13 = var1.n() ? zbuk.e(var1.D()) : var1.D();
               var6 = (double)var29 / (var11 - var13);
            } else {
               var11 = (double)((int)var1.z());
               var13 = (double)((int)var1.D());
               int var17;
               if (var8) {
                  if (!var1.c().e().f() && !var1.c().u()) {
                     var17 = a(var1.j(), (int)var11, (int)var13, var1.c().S());
                     if (var17 == 0) {
                        var17 = 1;
                     }
                  } else {
                     var17 = a(var1.j(), (int)var11, (int)var13, var1.c().S()) + 1;
                     var9 = (double)a(var1.j(), var1.y(), 1, (int)var9, var1.c().S());
                  }
               } else if (!var1.c().e().f() && !var1.c().u()) {
                  var17 = (int)var11 - (int)var13;
                  if (var17 == 0) {
                     var17 = 1;
                  }
               } else {
                  var17 = (int)var11 - (int)var13 + 1;
                  ++var9;
               }

               var6 = (double)var29 / (double)var17;
            }

            double var30;
            if (var1.s().e() && var15 > 0.0D) {
               var30 = var13;

               label296:
               while(true) {
                  while(true) {
                     if (var30 > var9) {
                        break label296;
                     }

                     double var19;
                     if (var8) {
                        int var21 = a(var1.j(), (int)var30, (int)var13, var1.c().S());
                        var19 = var6 * (double)var21;
                     } else {
                        var19 = var6 * (var30 - var13);
                     }

                     if (!var1.c().B().f().f() || var30 != var13 && var30 != var9) {
                        if (var3) {
                           if (var1.d() != 0 && var1.d() != 2) {
                              if (var1.p()) {
                                 zama.a(var0, (float)((double)var2.i() - var19), (float)var2.d(), (float)((double)var2.i() - var19), (float)var2.j(), var1.s());
                              } else {
                                 zama.a(var0, (float)((double)var2.c() + var19), (float)var2.d(), (float)((double)var2.c() + var19), (float)var2.j(), var1.s());
                              }
                           } else if (var1.p()) {
                              zama.a(var0, (float)var2.c(), (float)((double)var2.d() + var19), (float)var2.i(), (float)((double)var2.d() + var19), var1.s());
                           } else {
                              zama.a(var0, (float)var2.c(), (float)((double)var2.j() - var19), (float)var2.i(), (float)((double)var2.j() - var19), var1.s());
                           }
                        } else if (var1.d() != 0 && var1.d() != 2) {
                           if (var1.p()) {
                              zama.a(var0, (float)var2.c(), (float)((double)var2.d() + var19), (float)var2.i(), (float)((double)var2.d() + var19), var1.s());
                           } else {
                              zama.a(var0, (float)var2.c(), (float)((double)var2.j() - var19), (float)var2.i(), (float)((double)var2.j() - var19), var1.s());
                           }
                        } else if (var1.p()) {
                           zama.a(var0, (float)((double)var2.i() - var19), (float)var2.d(), (float)((double)var2.i() - var19), (float)var2.j(), var1.s());
                        } else {
                           zama.a(var0, (float)((double)var2.c() + var19), (float)var2.d(), (float)((double)var2.c() + var19), (float)var2.j(), var1.s());
                        }
                     }

                     if (var8) {
                        var30 = (double)a(var1.j(), var1.y(), (int)var15, (int)var30, var1.c().S());
                     } else if (var4.av() || var1.d() != 0 && var1.d() != 2) {
                        var30 = zbuk.b(var30, var15);
                     } else {
                        var30 += var15 * (double)var1.J();
                     }
                  }
               }
            }

            double var22;
            double var31;
            int var32;
            if (!var1.n()) {
               var30 = var1.B();
               if (var1.u().e() && var30 > 0.0D) {
                  var32 = 0;
                  if (var8) {
                     int var20 = a(var1.j(), var1.y(), (int)var15, (int)var13, var1.c().S());
                     var32 = a(var1.j(), var20, (int)var13, var1.c().S());
                  }

                  var31 = var13;

                  while(true) {
                     while(var31 <= var9) {
                        boolean var24 = false;
                        if (var8) {
                           int var25 = a(var1.j(), (int)var31, (int)var13, var1.c().S());
                           var22 = var6 * (double)var25;
                           if (var25 % var32 == 0 && var1.s().e()) {
                              var24 = true;
                           }
                        } else {
                           var22 = var6 * (var31 - var13);
                           if (zbuk.a(var31, var13) % var15 == 0.0D && var1.s().e()) {
                              var24 = true;
                           }
                        }

                        if ((!var1.c().B().f().f() || var31 != var13 && var31 != var9) && !var24) {
                           if (var3) {
                              if (var1.d() != 0 && var1.d() != 2) {
                                 if (var1.p()) {
                                    zama.a(var0, (float)((double)var2.i() - var22), (float)var2.d(), (float)((double)var2.i() - var22), (float)var2.j(), var1.u());
                                 } else {
                                    zama.a(var0, (float)((double)var2.c() + var22), (float)var2.d(), (float)((double)var2.c() + var22), (float)var2.j(), var1.u());
                                 }
                              } else if (var1.p()) {
                                 zama.a(var0, (float)var2.c(), (float)((double)var2.d() + var22), (float)var2.i(), (float)((double)var2.d() + var22), var1.u());
                              } else {
                                 zama.a(var0, (float)var2.c(), (float)((double)var2.j() - var22), (float)var2.i(), (float)((double)var2.j() - var22), var1.u());
                              }
                           } else if (var1.d() != 0 && var1.d() != 2) {
                              if (var1.p()) {
                                 zama.a(var0, (float)var2.c(), (float)((double)var2.d() + var22), (float)var2.i(), (float)((double)var2.d() + var22), var1.u());
                              } else {
                                 zama.a(var0, (float)var2.c(), (float)((double)var2.j() - var22), (float)var2.i(), (float)((double)var2.j() - var22), var1.u());
                              }
                           } else if (var1.p()) {
                              zama.a(var0, (float)((double)var2.i() - var22), (float)var2.d(), (float)((double)var2.i() - var22), (float)var2.j(), var1.u());
                           } else {
                              zama.a(var0, (float)((double)var2.c() + var22), (float)var2.d(), (float)((double)var2.c() + var22), (float)var2.j(), var1.u());
                           }
                        }

                        if (var8) {
                           var31 = (double)a(var1.j(), var1.C(), (int)var30, (int)var31, var1.c().S());
                        } else if (var4.av() || var1.d() != 0 && var1.d() != 2) {
                           var31 = zbuk.b(var31, var30);
                        } else {
                           var31 += var30 * (double)var1.J();
                        }
                     }

                     return;
                  }
               }
            } else {
               var30 = var1.B();
               var32 = zbuk.h(var30);
               var31 = var1.n() ? zbuk.e(var30) : var30;
               if (var1.u().e() && var30 > 0.0D) {
                  for(var22 = var13; var22 <= var9 + var31; var22 = zbuk.b(var22, var31)) {
                     for(int var33 = 1; var33 <= 10; ++var33) {
                        double var34 = Math.pow((double)var33, (double)var32) * Math.pow(10.0D, var22);
                        var34 = zbuk.e(var34);
                        if ((var33 != 1 || var22 == var13) && var34 <= var9) {
                           double var27 = var6 * (var34 - var13);
                           if (var3) {
                              if (var1.d() != 0 && var1.d() != 2) {
                                 if (var1.p()) {
                                    zama.a(var0, (float)((double)var2.i() - var27), (float)var2.d(), (float)((double)var2.i() - var27), (float)var2.j(), var1.u());
                                 } else {
                                    zama.a(var0, (float)((double)var2.c() + var27), (float)var2.d(), (float)((double)var2.c() + var27), (float)var2.j(), var1.u());
                                 }
                              } else if (var1.p()) {
                                 zama.a(var0, (float)var2.c(), (float)((double)var2.d() + var27), (float)var2.i(), (float)((double)var2.d() + var27), var1.u());
                              } else {
                                 zama.a(var0, (float)var2.c(), (float)((double)var2.j() - var27), (float)var2.i(), (float)((double)var2.j() - var27), var1.u());
                              }
                           } else if (var1.d() != 0 && var1.d() != 2) {
                              if (var1.p()) {
                                 zama.a(var0, (float)var2.c(), (float)((double)var2.d() + var27), (float)var2.i(), (float)((double)var2.d() + var27), var1.u());
                              } else {
                                 zama.a(var0, (float)var2.c(), (float)((double)var2.j() - var27), (float)var2.i(), (float)((double)var2.j() - var27), var1.u());
                              }
                           } else if (var1.p()) {
                              zama.a(var0, (float)((double)var2.i() - var27), (float)var2.d(), (float)((double)var2.i() - var27), (float)var2.j(), var1.u());
                           } else {
                              zama.a(var0, (float)((double)var2.c() + var27), (float)var2.d(), (float)((double)var2.c() + var27), (float)var2.j(), var1.u());
                           }
                        }
                     }
                  }
               }
            }

         }
      }
   }

   static void a(zn var0, zbo var1, com.aspose.cells.b.a.b.zp var2, int var3) {
      if (!zbuk.a(var2)) {
         double var4 = 6.283185307179586D / (double)var3;
         double var6 = (double)var2.c() + (double)var2.e() / 2.0D;
         double var8 = (double)var2.d() + (double)var2.f() / 2.0D;
         new com.aspose.cells.b.a.b.zo((float)var6, (float)var8);
         double var13 = (double)(var2.e() / 2);
         double var33;
         com.aspose.cells.b.a.b.zo var35;
         double var36;
         double var38;
         double var11;
         double var15;
         double var17;
         double var19;
         double var21;
         double var23;
         double var25;
         double var27;
         com.aspose.cells.b.a.b.zo var29;
         int var30;
         double var31;
         if (var1.c().d && var1 == var1.c().E()) {
            var15 = 0.0D;
            var17 = var1.n() ? zbuk.e(var1.b) : var1.b;
            var19 = var1.n() ? zbuk.e(var1.c) : var1.c;
            var21 = var1.n() ? zbuk.e(var1.d) : var1.d;
            var23 = var1.n() ? zbuk.e(var1.e) : var1.e;
            if (var21 > 0.0D) {
               for(var25 = var19 + var21; var25 <= var17; var25 = zbuk.b(var25, var21)) {
                  var15 = Math.abs(var25 - var19);
                  var27 = var13 * var15 / (var17 - var19);
                  var11 = 1.5707963267948966D;
                  var29 = com.aspose.cells.b.a.b.zo.a();

                  for(var30 = 0; var30 < var3; ++var30) {
                     if (var1.s().e()) {
                        var31 = var6 + var27 * Math.cos(var11);
                        var33 = var8 - var27 * Math.sin(var11);
                        var35 = new com.aspose.cells.b.a.b.zo((float)var31, (float)var33);
                        if (var30 == 0) {
                           var36 = var6 + var27 * Math.cos(var11 + var4);
                           var38 = var8 - var27 * Math.sin(var11 + var4);
                           var29 = new com.aspose.cells.b.a.b.zo((float)var36, (float)var38);
                        }

                        if (Math.abs(var35.d() - var29.d()) > 1.0F || Math.abs(var35.e() - var29.e()) > 1.0F) {
                           zama.a(var0, var35, var29, var1.s());
                           var29 = var35;
                        }
                     }

                     var11 -= var4;
                  }
               }
            }

            if (var23 > 0.0D) {
               for(var25 = var19 + var23; var25 <= var17; var25 = zbuk.b(var25, var23)) {
                  var15 = Math.abs(var25 - var19);
                  var27 = var13 * var15 / (var17 - var19);
                  var11 = 1.5707963267948966D;
                  var29 = com.aspose.cells.b.a.b.zo.a();

                  for(var30 = 0; var30 < var3; ++var30) {
                     if (var1.u().e()) {
                        var31 = var6 + var27 * Math.cos(var11);
                        var33 = var8 - var27 * Math.sin(var11);
                        var35 = new com.aspose.cells.b.a.b.zo((float)var31, (float)var33);
                        if (var30 == 0) {
                           var36 = var6 + var27 * Math.cos(var11 + var4);
                           var38 = var8 - var27 * Math.sin(var11 + var4);
                           var29 = new com.aspose.cells.b.a.b.zo((float)var36, (float)var38);
                        }

                        if (Math.abs(var35.d() - var29.d()) > 1.0F || Math.abs(var35.e() - var29.e()) > 1.0F) {
                           zama.a(var0, var35, var29, var1.u());
                           var29 = var35;
                        }
                     }

                     var11 -= var4;
                  }
               }
            }
         } else {
            var15 = 0.0D;
            var17 = var1.S();
            var19 = var1.T();
            var21 = var1.V();
            var23 = var1.W();
            if (var21 > 0.0D) {
               for(var25 = var19 + var21; var25 <= var17; var25 = zbuk.b(var25, var21)) {
                  var15 = Math.abs(var25 - var19);
                  var27 = var13 * var15 / (var17 - var19);
                  var11 = 1.5707963267948966D;
                  var29 = com.aspose.cells.b.a.b.zo.a();

                  for(var30 = 0; var30 < var3; ++var30) {
                     if (var1.s().e()) {
                        var31 = var6 + var27 * Math.cos(var11);
                        var33 = var8 - var27 * Math.sin(var11);
                        var35 = new com.aspose.cells.b.a.b.zo((float)var31, (float)var33);
                        if (var30 == 0) {
                           var36 = var6 + var27 * Math.cos(var11 + var4);
                           var38 = var8 - var27 * Math.sin(var11 + var4);
                           var29 = new com.aspose.cells.b.a.b.zo((float)var36, (float)var38);
                        }

                        if (Math.abs(var35.d() - var29.d()) > 1.0F || Math.abs(var35.e() - var29.e()) > 1.0F) {
                           zama.a(var0, var35, var29, var1.s());
                           var29 = var35;
                        }
                     }

                     var11 -= var4;
                  }
               }
            }

            if (var23 > 0.0D) {
               for(var25 = var19 + var23; var25 <= var17; var25 = zbuk.b(var25, var23)) {
                  var15 = Math.abs(var25 - var19);
                  var27 = var13 * var15 / (var17 - var19);
                  var11 = 1.5707963267948966D;
                  var29 = com.aspose.cells.b.a.b.zo.a();

                  for(var30 = 0; var30 < var3; ++var30) {
                     if (var1.u().e()) {
                        var31 = var6 + var27 * Math.cos(var11);
                        var33 = var8 - var27 * Math.sin(var11);
                        var35 = new com.aspose.cells.b.a.b.zo((float)var31, (float)var33);
                        if (var30 == 0) {
                           var36 = var6 + var27 * Math.cos(var11 + var4);
                           var38 = var8 - var27 * Math.sin(var11 + var4);
                           var29 = new com.aspose.cells.b.a.b.zo((float)var36, (float)var38);
                        }

                        if (Math.abs(var35.d() - var29.d()) > 1.0F || Math.abs(var35.e() - var29.e()) > 1.0F) {
                           zama.a(var0, var35, var29, var1.u());
                           var29 = var35;
                        }
                     }

                     var11 -= var4;
                  }
               }
            }
         }

      }
   }

   static void a(zn var0, zbo var1, boolean var2, float var3, com.aspose.cells.b.a.b.zp var4, zbcp var5) throws Exception {
      if (!zbuk.a(var4)) {
         int var6 = var5.ag();
         zbtj var7 = var1.F();
         zjd var8 = var5.D().b(0);
         String var9 = var8.z();
         boolean var10 = var8.A();
         boolean var11 = false;
         if (var7.h() && var8 != null) {
            var11 = true;
         }

         zama.a(var0, var3, (float)var4.d(), var3, (float)var4.j(), var1.g());
         zrm var12 = var1.Q();
         byte var13 = 8;
         float var14 = 0.0F;
         float var15 = (float)(2 * var1.X() + var1.Z());
         float var16 = var1.g / 2.0F;
         if (var1.m == 1) {
            var14 = (float)var4.c() - var1.f;
            var12.b().b.a((int)var14 - var12.b().b.e());
         } else {
            float var10001;
            if (var1.m == 2) {
               var13 = 7;
               var14 = (float)var4.i();
               var14 += var15;
               var10001 = var14 + var1.f;
               var12.b().b.a((int)var10001);
            } else if (var1.m == 3) {
               if (var2) {
                  var13 = 7;
                  var14 = var3 + var15;
                  var10001 = var14 + var1.f;
                  var12.b().b.a((int)var10001);
               } else {
                  var14 = var3 - var1.f;
                  var12.b().b.a((int)var14 - var12.b().b.e());
               }
            }
         }

         var12.b().b.b(var4.d());
         ArrayList var17 = var1.l;
         double var18 = var1.S();
         double var20 = var1.T();
         double var22 = var1.V();
         double var24 = var1.W();
         int var26;
         double var27;
         double var29;
         float var31;
         String var32;
         Color var33;
         com.aspose.cells.b.a.b.zq var34;
         if (!var1.p()) {
            for(var26 = var17.size() - 1; var26 >= 0; --var26) {
               var27 = com.aspose.cells.b.a.ze.g(var17.get(var26));
               var29 = var1.n() ? zbuk.f(var27) : var27;
               if (var26 - 1 > 0) {
                  if (Math.abs(zbuk.a(var22, Math.abs(zbuk.a(var27, com.aspose.cells.b.a.ze.g(var17.get(var26 - 1)))))) / var22 > b) {
                     continue;
                  }
               } else if (var26 + 1 < var17.size() && Math.abs(zbuk.a(var22, Math.abs(zbuk.a(var27, com.aspose.cells.b.a.ze.g(var17.get(var26 + 1)))))) / var22 > b) {
                  continue;
               }

               var31 = (float)((double)var4.d() + (var18 - var27) / (var18 - var20) * (double)var4.f());
               if (var1.m != 0) {
                  if (zhz.b(var6)) {
                     var29 /= 100.0D;
                     var9 = "0%";
                  }

                  var32 = "";
                  var29 = var1.n() ? var29 : var29 * Math.pow(10.0D, var1.Q().f());
                  var33 = var7.g();
                  if (var11) {
                     var32 = zpv.a(var1.c().al(), var29, var9, var10);
                     var33 = zpv.a(var29, var9, var33);
                  } else {
                     var32 = a((zbo)var1, (Object)var29);
                     var33 = zpv.a(var29, var7.b(), var33);
                  }

                  var34 = new com.aspose.cells.b.a.b.zq(var14, var31 - var16, var1.f - var15, var1.g);
                  a(var0, com.aspose.cells.b.a.b.zp.a(var34), var32, var7.d(), var7.a(), var33, var13, 1, com.aspose.cells.b.a.b.zv.c());
               }

               a(var0, var1, var2, var3, var31);
            }
         } else {
            for(var26 = 0; var26 < var17.size(); ++var26) {
               var27 = com.aspose.cells.b.a.ze.g(var17.get(var26));
               var29 = var1.n() ? zbuk.f(var27) : var27;
               if (var26 - 1 > 0) {
                  if (Math.abs(zbuk.a(var22, Math.abs(zbuk.a(var27, com.aspose.cells.b.a.ze.g(var17.get(var26 - 1)))))) / var22 > b) {
                     continue;
                  }
               } else if (var26 + 1 < var17.size() && Math.abs(zbuk.a(var22, Math.abs(zbuk.a(var27, com.aspose.cells.b.a.ze.g(var17.get(var26 + 1)))))) / var22 > b) {
                  continue;
               }

               var31 = (float)((double)var4.d() + (var27 - var1.D()) / (var1.z() - var1.D()) * (double)var4.f());
               if (var1.m != 0) {
                  if (zhz.b(var6)) {
                     var29 /= 100.0D;
                     var9 = "0%";
                  }

                  var32 = "";
                  var29 = var1.n() ? var29 : var29 * Math.pow(10.0D, var1.Q().f());
                  var33 = var7.g();
                  if (var11) {
                     var32 = zpv.a(var1.c().al(), var29, var9, var10);
                     var33 = zpv.a(var29, var9, var33);
                  } else {
                     var32 = a((zbo)var1, (Object)var29);
                     var33 = zpv.a(var29, var7.b(), var33);
                  }

                  var34 = new com.aspose.cells.b.a.b.zq(var14, var31 - var16, var1.f - var15, var1.g);
                  a(var0, com.aspose.cells.b.a.b.zp.a(var34), var32, var7.d(), var7.a(), var33, var13, 1, com.aspose.cells.b.a.b.zv.c());
               }

               a(var0, var1, var2, var3, var31);
            }
         }

         a(var0, var1, var2, var3, (float)var4.d(), (float)var4.j());
         var12.b().e(var4.e());
         var12.b().f(var4.f());
         zbtp.a(var1.c(), var12);
      }
   }

   private static void a(zn var0, zbo var1, boolean var2, float var3, float var4) {
      zbo var5 = a(var1);
      boolean var6 = false;
      boolean var7 = false;
      switch(var1.w()) {
      case 0:
         var6 = true;
         var7 = true;
         break;
      case 1:
         var6 = true;
         if (var2) {
            var6 = false;
            var7 = true;
         }

         if (var5.o) {
            if (var2) {
               var6 = true;
               var7 = false;
            } else {
               var6 = false;
               var7 = true;
            }
         }
      case 2:
      default:
         break;
      case 3:
         var7 = true;
         if (var2) {
            var7 = false;
            var6 = true;
         }

         if (var5.o) {
            if (!var2) {
               var6 = true;
               var7 = false;
            } else {
               var6 = false;
               var7 = true;
            }
         }
      }

      if (var6) {
         zama.a(var0, var3, var4, var3 + (float)var1.X(), var4, var1.g());
      }

      if (var7) {
         zama.a(var0, var3 - (float)var1.X(), var4, var3, var4, var1.g());
      }

   }

   private static void a(zn var0, zbo var1, boolean var2, float var3, float var4, float var5) {
      if (var1.A() != 2) {
         zbo var6 = a(var1);
         boolean var7 = false;
         boolean var8 = false;
         switch(var1.A()) {
         case 0:
            var7 = true;
            var8 = true;
            break;
         case 1:
            var7 = true;
            if (var2) {
               var7 = false;
               var8 = true;
            }

            if (var6.o) {
               if (var2) {
                  var7 = true;
                  var8 = false;
               } else {
                  var7 = false;
                  var8 = true;
               }
            }
         case 2:
         default:
            break;
         case 3:
            var8 = true;
            if (var2) {
               var8 = false;
               var7 = true;
            }

            if (var6.o) {
               if (!var2) {
                  var7 = true;
                  var8 = false;
               } else {
                  var7 = false;
                  var8 = true;
               }
            }
         }

         float var10 = (float)(var1.B() / (var1.z() - var1.D()) * (double)(var5 - var4));
         float var9;
         if (!var1.p()) {
            var9 = var5;
            var10 = -var10;
         } else {
            var9 = var4;
         }

         float var11 = var9;

         do {
            if (var7) {
               zama.a(var0, var3, var11, var3 + (float)var1.Y(), var11, var1.g());
            }

            if (var8) {
               zama.a(var0, var3 - (float)var1.Y(), var11, var3, var11, var1.g());
            }

            var11 += var10;
         } while(var4 <= var11 && var11 <= var5);

      }
   }

   static void a(zn var0, zbo var1, boolean var2, float var3, com.aspose.cells.b.a.b.zp var4, int var5, boolean var6) throws Exception {
      if (!zbuk.a(var4)) {
         if (var1.k() == 2) {
            a(var0, var1, var2, var3, var4);
         } else {
            zama.a(var0, (float)var4.c(), var3, (float)var4.i(), var3, var1.g());
            float var7 = 0.0F;
            byte var8 = 9;
            float var9 = (float)var1.F().k();
            if (var1.m != 0) {
               var9 += (float)(var1.X() + var1.Y());
            }

            float var10 = 0.0F;
            if (var1.m == 1) {
               var7 = (float)var4.j() + var9;
               var10 = (float)var4.j() + var9;
            } else if (var1.m == 2) {
               var8 = 0;
               var7 = (float)var4.d() - var9 - var1.h;
               var10 = (float)var4.d() - var9;
            } else if (var1.m == 3) {
               if (var2) {
                  var7 = var3 - var9 - var1.h;
                  var10 = var3 - var9;
                  var8 = 0;
               } else {
                  var7 = var3 + var9;
                  var10 = var3 + var9;
               }
            }

            zif var11 = var1.c();
            zbcr var12 = var11.z();
            zbtj var13 = var1.F();
            ArrayList var14;
            ArrayList[] var15;
            if (var1.d() == 0) {
               var14 = var11.z().c();
               var15 = var11.z().e();
            } else {
               var14 = var11.z().d();
               var15 = var11.z().g();
            }

            boolean var16 = false;
            if (var13.h() && var14.size() > 0) {
               var16 = true;
            }

            if (var15 != null && var15.length > 0 && var14.size() > 0) {
               var16 = true;
            }

            boolean var17 = false;
            int var18 = var5;
            if (var1.p) {
               var18 = (int)var1.z();
            }

            int var40;
            if (!var1.f() && !var11.u()) {
               var40 = var18 - 1;
               if (var40 == 0) {
                  var40 = 1;
               }
            } else {
               var40 = var18;
            }

            double var19 = (double)var4.e() / (double)var40;
            com.aspose.cells.b.a.b.zt var21 = new com.aspose.cells.b.a.b.zt(var1.i, var1.h);
            float var22 = -1.0F;
            float var23 = -1.0F;

            float var49;
            for(int var24 = 0; var24 < var18; ++var24) {
               double var28 = (double)(var24 + 1) * var19;
               if (!var1.f() && !var1.c().u()) {
                  var28 -= var19 / 2.0D;
               }

               float var25;
               float var26;
               float var27;
               if (!var1.p()) {
                  var25 = (float)((double)var4.c() + (double)(var24 + 1) * var19);
                  var26 = (float)((double)var4.c() + var28 - var19);
                  var27 = (float)((double)var4.c() + (double)(var24 + 1) * var19 - var19 / 2.0D);
               } else {
                  var25 = (float)((double)(var4.c() + var4.e()) - (double)(var24 + 1) * var19);
                  var26 = (float)((double)(var4.c() + var4.e()) - var28);
                  var27 = (float)((double)(var4.c() + var4.e()) - (double)(var24 + 1) * var19 + var19 / 2.0D);
               }

               if (var1.m != 0 && var24 % var1.H() == 0 && var24 < var1.l.size()) {
                  String var30 = "";
                  Color var31 = var13.g();
                  if (!var16) {
                     var30 = a(var1, var1.l.get(var24));
                     var31 = zpv.a(var1.l.get(var24), var13.b(), var31);
                  } else {
                     String var32 = "";
                     boolean var33 = false;
                     var32 = var24 < var14.size() ? ((zfo)var14.get(var24)).c() : "";
                     var33 = var24 < var14.size() ? ((zfo)var14.get(var24)).b() : false;
                     var30 = zpv.a(var1.c().al(), var1.l.get(var24), var32, var33);
                     var31 = zpv.a(var1.l.get(var24), var32, var31);
                  }

                  float var47 = var1.h;
                  com.aspose.cells.b.a.b.zs var50 = zbsp.a(var0, var30, var13.d(), var13.a(), (com.aspose.cells.b.a.b.zt)var21, 1, 1);
                  if ((float)var50.c() < var1.h) {
                     var47 = (float)var50.c();
                  }

                  com.aspose.cells.b.a.b.zq var34 = new com.aspose.cells.b.a.b.zq((float)((double)var26 + var19 / 2.0D - (double)(var1.i / 2.0F)), var7, var1.i, var47);
                  if (var13.d() != 0 && var13.d() != 90 && var13.d() != -90) {
                     if (var13.d() == 255) {
                        zbsp.a(var0, var30, var13.a(), var31, var27, var7, var1.i, var1.h, var13.e());
                     } else {
                        a(var0, var30, new com.aspose.cells.b.a.b.zo(var27, var10), new com.aspose.cells.b.a.b.zt(var1.i, var47), var13.d(), var13.a(), var31, var1.a());
                     }
                  } else {
                     byte var35 = 1;
                     byte var36 = 1;
                     if (var13.d() != 90 && var13.d() != -90) {
                        a(var0, com.aspose.cells.b.a.b.zp.a(var34), var30, var13.d(), var13.a(), var31, var35, var36);
                     } else {
                        com.aspose.cells.b.a.b.zs var37 = zbsp.a(var0, var30, var13.d(), var13.a(), (com.aspose.cells.b.a.b.zt)var34.e(), var35, var36);
                        com.aspose.cells.b.a.b.zt var38 = zbuk.a(var0, var30, var13.a(), new com.aspose.cells.b.a.b.zt(var34.i(), var34.h()));
                        com.aspose.cells.b.a.b.zq var39 = new com.aspose.cells.b.a.b.zq((float)((double)var26 + var19 / 2.0D - (double)(var37.b() / 2)), var7, (float)var37.b(), (float)var37.c());
                        var39.b(var39.g() - ((float)var37.c() - var38.b()) / 2.0F);
                        a(var0, com.aspose.cells.b.a.b.zp.a(var39), var30, var13.d(), var13.a(), var31, var35, var36);
                     }
                  }
               }

               float var46;
               if (var24 == 0) {
                  if (!var1.p()) {
                     var46 = (float)var4.c();
                  } else {
                     var46 = (float)var4.i();
                  }

                  if (var46 >= (float)var4.c() && var46 <= (float)(var4.c() + var4.e())) {
                     a(var0, var1, var2, var46, var3, var4);
                  }

                  if (!var1.p()) {
                     var49 = var46 - (float)(var19 * (double)var1.J() / 2.0D);
                  } else {
                     var49 = var46 + (float)(var19 * (double)var1.J() / 2.0D);
                  }

                  if (var49 > (float)var4.c() && var49 < (float)(var4.c() + var4.e())) {
                     b(var0, var1, var2, var49, var3, var4);
                  }
               }

               if ((var24 + 1) % var1.J() == 0) {
                  if (var25 >= (float)var4.c() && var25 <= (float)(var4.c() + var4.e()) && Math.abs(var22 - var25) > (float)var1.g().b().a() / 2.0F) {
                     a(var0, var1, var2, var25, var3, var4);
                     var22 = var25;
                  }

                  if (!var1.p()) {
                     var46 = var25 - (float)(var19 * (double)var1.J() / 2.0D);
                  } else {
                     var46 = var25 + (float)(var19 * (double)var1.J() / 2.0D);
                  }

                  if (var46 > (float)var4.c() && var46 < (float)(var4.c() + var4.e()) && Math.abs(var23 - var46) > (float)var1.g().b().a() / 2.0F) {
                     b(var0, var1, var2, var46, var3, var4);
                     var23 = var46;
                  }
               }
            }

            if (var15 != null && var15.length > 0 && var14.size() > 0 && var1.m != 0) {
               float var41 = (float)(var15.length + 1) * var9;
               ArrayList var42 = var15[0];
               zfo var43 = (zfo)var42.get(0);
               String var44 = zpv.a(var1.c().al(), var43.a(), var43.c(), var43.b());
               com.aspose.cells.b.a.b.zs var45 = zbsp.a(var1.c().ap(), var44, 0, var13.a(), (com.aspose.cells.b.a.b.zt)(new com.aspose.cells.b.a.b.zt((float)var4.b().b(), (float)var4.b().c())), 1, 1);
               float var29 = 0.0F;
               boolean var48 = true;
               if (var1.m == 1) {
                  var7 = (float)var4.j() + var41 + var1.g;
                  var29 = (float)var4.j();
                  var48 = false;
               } else if (var1.m == 2) {
                  var7 = (float)var4.d() - var41 - var1.g;
                  var29 = (float)var4.d();
                  var48 = true;
               } else if (var1.m == 3) {
                  if (var2) {
                     var7 = var3 - var41 - var1.g + (float)var45.c();
                     var48 = true;
                  } else {
                     var7 = var3 + var41 + var1.g - (float)var45.c();
                     var48 = false;
                  }

                  var29 = var3;
               }

               if (!var1.p()) {
                  var49 = (float)var4.c();
               } else {
                  var49 = (float)var4.i();
               }

               a(var0, var15, var49, var7, var9, var48, var1, var19, var13, var8, var29, var4, var6);
            }

         }
      }
   }

   private static void a(zn var0, zbo var1, boolean var2, float var3, float var4, com.aspose.cells.b.a.b.zp var5) {
      zbo var6 = a(var1);
      boolean var7 = false;
      boolean var8 = false;
      switch(var1.w()) {
      case 0:
         var7 = true;
         var8 = true;
         break;
      case 1:
         var7 = true;
         if (var2) {
            var7 = false;
            var8 = true;
         }

         if (var6.o) {
            if (var2) {
               var7 = true;
               var8 = false;
            } else {
               var7 = false;
               var8 = true;
            }
         }
      case 2:
      default:
         break;
      case 3:
         var8 = true;
         if (var2) {
            var8 = false;
            var7 = true;
         }

         if (var6.o) {
            if (!var2) {
               var7 = true;
               var8 = false;
            } else {
               var7 = false;
               var8 = true;
            }
         }
      }

      if (var7) {
         zama.a(var0, var3, var4 - (float)var1.X(), var3, var4, var1.g());
      }

      if (var8) {
         zama.a(var0, var3, var4, var3, var4 + (float)var1.X(), var1.g());
      }

   }

   private static void b(zn var0, zbo var1, boolean var2, float var3, float var4, com.aspose.cells.b.a.b.zp var5) {
      zbo var6 = a(var1);
      boolean var7 = false;
      boolean var8 = false;
      switch(var1.A()) {
      case 0:
         var7 = true;
         var8 = true;
         break;
      case 1:
         var7 = true;
         if (var2) {
            var7 = false;
            var8 = true;
         }

         if (var6.o) {
            if (var2) {
               var7 = true;
               var8 = false;
            } else {
               var7 = false;
               var8 = true;
            }
         }
      case 2:
      default:
         break;
      case 3:
         var8 = true;
         if (var2) {
            var8 = false;
            var7 = true;
         }

         if (var6.o) {
            if (!var2) {
               var7 = true;
               var8 = false;
            } else {
               var7 = false;
               var8 = true;
            }
         }
      }

      if (var7) {
         zama.a(var0, var3, var4 - (float)var1.Y(), var3, var4, var1.g());
      }

      if (var8) {
         zama.a(var0, var3, var4, var3, var4 + (float)var1.Y(), var1.g());
      }

   }

   private static void a(zn var0, zbo var1, boolean var2, float var3, com.aspose.cells.b.a.b.zp var4) throws Exception {
      ArrayList var5 = var1.l;
      zif var6 = var1.c();
      zama.a(var0, (float)var4.c(), var3, (float)var4.i(), var3, var1.g());
      float var7 = 0.0F;
      float var8 = (float)var1.F().k();
      if (var1.m != 0) {
         var8 += (float)var1.X();
      }

      float var9 = 0.0F;
      if (var1.m == 1) {
         var7 = (float)var4.j() + var8;
         var9 = (float)var4.j() + var8;
      } else if (var1.m == 2) {
         var7 = (float)var4.d() - var8 - var1.h;
         var9 = (float)var4.d() - var8;
      } else if (var1.m == 3) {
         if (var2) {
            var7 = var3 - var8 - var1.h;
            var9 = var3 - var8;
         } else {
            var7 = var3 + var8;
            var9 = var3 + var8;
         }
      }

      zbtj var10 = var1.F();
      boolean var13 = false;
      ArrayList var11;
      ArrayList[] var12;
      if (var1.d() == 0) {
         var11 = var6.z().c();
         var12 = var6.z().e();
         var13 = var6.z().b;
      } else {
         var11 = var6.z().d();
         var12 = var6.z().g();
         var13 = var6.z().c;
      }

      boolean var14 = false;
      if (var10.h() && var11.size() > 0) {
         var14 = true;
      }

      if (var12 != null && var12.length > 0 && var11.size() > 0) {
         var14 = true;
      }

      boolean var15 = false;
      int var16 = (int)var1.z();
      int var17 = (int)var1.D();
      int var18 = var1.j();
      int var36;
      if (!var6.e().f() && !var6.u()) {
         var36 = a(var18, var16, var17, var1.c().S());
         if (var36 == 0) {
            var36 = 1;
         }
      } else {
         var36 = a(var18, var16, var17, var1.c().S()) + 1;
      }

      double var19 = (double)var4.e() / (double)var36;
      float var21 = 0.0F;
      float var22 = 0.0F;
      float var23 = 0.0F;
      float var24 = 0.0F;
      if (var1.p()) {
         var24 = (float)(var4.c() + var4.e());
      } else {
         var24 = (float)var4.c();
      }

      com.aspose.cells.b.a.b.zt var25 = new com.aspose.cells.b.a.b.zt(var1.f, var1.h);

      int var28;
      for(int var26 = 0; var26 < var5.size(); ++var26) {
         int var27 = com.aspose.cells.b.a.zo.a(com.aspose.cells.b.a.zr.a(var1.l.get(var26)));
         var28 = a(var18, var27, var17, var1.c().S());
         float var29 = (float)(var19 * (double)var28);
         var21 = (float)(var19 * (double)a(var18, a(var1.j(), var1.y(), (int)var1.x(), var27, var1.c().S()), var27, var1.c().S()));
         if (var1.f() || var6.u()) {
            var29 += (float)(var19 / 2.0D);
         }

         if (var1.p()) {
            var22 = (float)(var4.c() + var4.e()) - var29;
            var23 = var22;
            var24 -= var21;
         } else {
            var22 = (float)var4.c() + var29;
            var23 = var22;
            var24 += var21;
         }

         if (var1.m != 0 && var26 % var1.H() == 0) {
            String var30 = "";
            Color var31 = var10.g();
            if (var14 && var13) {
               String var32 = "";
               boolean var33 = false;
               var30 = a(var1, var1.l.get(var26));
               var31 = zpv.a(var1.l.get(var26), var10.b(), var31);
               Iterator var34 = var11.iterator();

               while(var34.hasNext()) {
                  zfo var35 = (zfo)var34.next();
                  if (zhz.a(var35.a(), var6.S()) == com.aspose.cells.b.a.ze.f(var1.l.get(var26))) {
                     var32 = var35.c();
                     var33 = var35.b();
                     var30 = zpv.a(var1.c().al(), var1.l.get(var26), var32, var33);
                     var31 = zpv.a(var1.l.get(var26), var32, var31);
                     break;
                  }
               }
            } else {
               var30 = a(var1, var1.l.get(var26));
               var31 = zpv.a(var1.l.get(var26), var10.b(), var31);
            }

            float var41 = var1.h;
            com.aspose.cells.b.a.b.zs var43 = zbsp.a(var0, var30, var10.d(), var10.a(), (com.aspose.cells.b.a.b.zt)var25, 1, 1);
            if ((float)var43.c() < var1.h) {
               var41 = (float)var43.c();
            }

            com.aspose.cells.b.a.b.zq var44 = new com.aspose.cells.b.a.b.zq(var22 - var1.f / 2.0F, var7, var1.f, var41);
            if (var10.d() != 0 && var10.d() != 90 && var10.d() != -90) {
               a(var0, var30, new com.aspose.cells.b.a.b.zo(var23, var9), new com.aspose.cells.b.a.b.zt(var1.f, var41), var10.d(), var10.a(), var31, var1.a());
            } else {
               a(var0, com.aspose.cells.b.a.b.zp.a(var44), var30, var10.d(), var10.a(), var31, 1, 1);
            }
         }

         if (var26 % var1.J() == 0 && var24 >= (float)var4.c() && var24 <= (float)(var4.c() + var4.e())) {
            a(var0, var1, var2, var24, var3, var4);
         }
      }

      float var37;
      if (var1.p()) {
         var37 = (float)(var4.c() + var4.e());
      } else {
         var37 = (float)var4.c();
      }

      var28 = var17;
      int var39 = a(var1.j(), var1.y(), (int)var1.x(), var17, var1.c().S());

      do {
         boolean var38 = true;
         int var40 = a(var1.j(), var1.C(), (int)var1.B(), var28, var1.c().S());
         if (var40 == var39) {
            var38 = false;
            var39 = a(var1.j(), var1.y(), (int)var1.x(), var39, var1.c().S());
         }

         if (var40 >= var39) {
            var39 = a(var1.j(), var1.y(), (int)var1.x(), var39, var1.c().S());
         }

         float var42 = (float)(var19 * (double)a(var18, var40, var28, var1.c().S()));
         if (var1.p()) {
            var37 -= var42;
         } else {
            var37 += var42;
         }

         if (var38 && var37 >= (float)var4.c() && var37 <= (float)(var4.c() + var4.e())) {
            b(var0, var1, var2, var37, var3, var4);
         }

         var28 = var40;
      } while(var37 >= (float)var4.c() && var37 <= (float)(var4.c() + var4.e()));

   }

   static void b(zn var0, zbo var1, boolean var2, float var3, com.aspose.cells.b.a.b.zp var4, zbcp var5) throws Exception {
      if (!zbuk.a(var4)) {
         int var6 = var5.ag();
         zbtj var7 = var1.F();
         zjd var8 = var5.D().b(0);
         String var9 = var8.z();
         boolean var10 = var8.A();
         boolean var11 = false;
         if (var7.h() && var8 != null) {
            var11 = true;
         }

         zama.a(var0, (float)var4.c(), var3, (float)var4.i(), var3, var1.g());
         zrm var12 = var1.Q();
         float var13 = 0.0F;
         float var14 = (float)(2 * var1.X());
         float var15 = var1.f / 2.0F;
         float var10001;
         if (var1.m == 1) {
            var13 = (float)var4.j();
            var13 += var14;
            var10001 = var13 + var1.g;
            var12.b().b.b((int)var10001);
         } else if (var1.m == 2) {
            var13 = (float)var4.d() - var1.g;
            var12.b().b.b((int)var13 - var12.b().m());
         } else if (var1.m == 3) {
            if (var2) {
               var13 = var3 - var1.g;
               var12.b().b.b((int)var13 - var12.b().m());
            } else {
               var13 = var3 + var14;
               var10001 = var13 + var1.g;
               var12.b().b.b((int)var10001);
            }
         }

         var12.b().b.a(var4.i() - var12.b().b.e());
         ArrayList var16 = var1.l;
         double var17 = var1.S();
         double var19 = var1.T();
         double var21 = var1.V();
         double var23 = var1.W();
         double var25 = 1.0E-10D;
         int var27;
         double var28;
         float var30;
         String var31;
         Color var32;
         com.aspose.cells.b.a.b.zq var33;
         if (!var1.p()) {
            for(var27 = 0; var27 < var1.l.size(); ++var27) {
               var28 = (Double)var1.l.get(var27);
               if (var27 - 1 > 0) {
                  if (Math.abs(zbuk.a(var21, Math.abs(zbuk.a(var28, com.aspose.cells.b.a.ze.g(var16.get(var27 - 1)))))) / var21 > var25) {
                     continue;
                  }
               } else if (var27 + 1 < var16.size() && Math.abs(zbuk.a(var21, Math.abs(zbuk.a(var28, com.aspose.cells.b.a.ze.g(var16.get(var27 + 1)))))) / var21 > var25) {
                  continue;
               }

               var30 = (float)((double)var4.c() + (var28 - var1.D()) / (var1.z() - var1.D()) * (double)var4.e());
               if (var1.m != 0) {
                  if (zhz.b(var6)) {
                     var28 /= 100.0D;
                     var9 = "0%";
                  }

                  var31 = "";
                  var32 = var7.g();
                  var28 *= Math.pow(10.0D, var1.Q().f());
                  if (var11) {
                     var31 = zpv.a(var1.c().al(), var28, var9, var10);
                     var32 = zpv.a(var28, var9, var32);
                  } else {
                     var31 = a((zbo)var1, (Object)var28);
                     var32 = zpv.a(var28, var7.b(), var32);
                  }

                  var33 = new com.aspose.cells.b.a.b.zq(var30 - var15, var13, var1.f, var1.g - var14);
                  a(var0, com.aspose.cells.b.a.b.zp.a(var33), var31, var7.d(), var7.a(), var32, 1, 1);
               }

               a(var0, var1, var2, var30, var3, var4);
            }
         } else {
            for(var27 = var1.l.size() - 1; var27 >= 0; --var27) {
               var28 = (Double)var1.l.get(var27);
               if (var27 - 1 > 0) {
                  if (Math.abs(zbuk.a(var21, Math.abs(zbuk.a(var28, com.aspose.cells.b.a.ze.g(var16.get(var27 - 1)))))) / var21 > var25) {
                     continue;
                  }
               } else if (var27 + 1 < var16.size() && Math.abs(zbuk.a(var21, Math.abs(zbuk.a(var28, com.aspose.cells.b.a.ze.g(var16.get(var27 + 1)))))) / var21 > var25) {
                  continue;
               }

               var30 = (float)((double)var4.c() + (var1.z() - var28) / (var1.z() - var1.D()) * (double)var4.e());
               if (var1.m != 0) {
                  if (zhz.b(var6)) {
                     var28 /= 100.0D;
                     var9 = "0%";
                  }

                  var31 = "";
                  var32 = var7.g();
                  var28 *= Math.pow(10.0D, var1.Q().f());
                  if (var11) {
                     var31 = zpv.a(var1.c().al(), var28, var9, var10);
                     var32 = zpv.a(var28, var9, var32);
                  } else {
                     var31 = a((zbo)var1, (Object)var28);
                     var32 = zpv.a(var28, var7.b(), var32);
                  }

                  var33 = new com.aspose.cells.b.a.b.zq(var30 - var15, var13, var1.f, var1.g - var14);
                  a(var0, com.aspose.cells.b.a.b.zp.a(var33), var31, var7.d(), var7.a(), var32, 1, 1);
               }

               a(var0, var1, var2, var30, var3, var4);
            }
         }

         a(var0, var1, var2, var3, (float)var4.c(), (float)var4.i(), var4);
         zbtp.a(var1.c(), var12);
      }
   }

   private static void a(zn var0, zbo var1, boolean var2, float var3, float var4, float var5, com.aspose.cells.b.a.b.zp var6) {
      if (var1.A() != 2) {
         zbo var7 = a(var1);
         boolean var8 = false;
         boolean var9 = false;
         switch(var1.A()) {
         case 0:
            var8 = true;
            var9 = true;
            break;
         case 1:
            var8 = true;
            if (var2) {
               var8 = false;
               var9 = true;
            }

            if (var7.o) {
               if (var2) {
                  var8 = true;
                  var9 = false;
               } else {
                  var8 = false;
                  var9 = true;
               }
            }
         case 2:
         default:
            break;
         case 3:
            var9 = true;
            if (var2) {
               var9 = false;
               var8 = true;
            }

            if (var7.o) {
               if (!var2) {
                  var8 = true;
                  var9 = false;
               } else {
                  var8 = false;
                  var9 = true;
               }
            }
         }

         float var11 = (float)(var1.B() / (var1.z() - var1.D()) * (double)(var5 - var4));
         float var10;
         if (var1.p()) {
            var10 = var5;
            var11 = -var11;
         } else {
            var10 = var4;
         }

         float var12 = var10;

         do {
            if (var8) {
               zama.a(var0, var12, var3, var12, var3 - (float)var1.Y(), var1.g());
            }

            if (var9) {
               zama.a(var0, var12, var3, var12, var3 + (float)var1.Y(), var1.g());
            }

            var12 += var11;
         } while(var4 <= var12 && var12 <= var5);

      }
   }

   static void a(zn var0, zbo var1, boolean var2, float var3, com.aspose.cells.b.a.b.zp var4, int var5) throws Exception {
      if (!zbuk.a(var4)) {
         if (var1.k() == 2) {
            b(var0, var1, var2, var3, var4);
         } else {
            zama.a(var0, var3, (float)var4.d(), var3, (float)var4.j(), var1.g());
            zif var6 = var1.c();
            float var7 = 0.0F;
            float var8 = 0.0F;
            float var9 = (float)(var1.X() + var1.Y() + var1.F().k());
            float var10 = var1.g / 2.0F;
            byte var11 = 8;
            float var12 = 0.0F;
            if (var1.F().d() == 0) {
               var12 = var1.g;
            } else if (Math.abs(var1.F().d()) == 90) {
               var12 = var1.f;
            }

            if (var12 > (float)var1.F().a().d() * 1.5F) {
               var11 = 1;
            }

            if (var1.m == 1) {
               var7 = (float)var4.c() - var1.i - var9;
               var8 = (float)var4.c() - var9;
            } else if (var1.m == 2) {
               var7 = (float)var4.i() + var9;
               var8 = (float)var4.i() + var9;
               var11 = 7;
            } else if (var1.m == 3) {
               if (var2) {
                  var7 = var3 + var9;
                  var8 = var3 + var9;
                  var11 = 7;
               } else {
                  var7 = var3 - var9 - var1.i;
                  var8 = var3 - var9;
               }
            }

            boolean var13 = false;
            int var30;
            if (!var1.f() && !var6.u()) {
               var30 = var5 - 1;
               if (var30 == 0) {
                  var30 = 1;
               }
            } else {
               var30 = var5;
            }

            double var14 = (double)var4.f() / (double)var30;
            zbtj var16 = var1.F();
            ArrayList var17;
            ArrayList[] var18;
            if (var1.d() == 0) {
               var17 = var6.z().c();
               var18 = var6.z().e();
            } else {
               var17 = var6.z().d();
               var18 = var6.z().g();
            }

            boolean var19 = false;
            if (var16.h() && var17.size() > 0) {
               var19 = true;
            }

            float var22;
            float var23;
            for(int var20 = 0; var20 < var5; ++var20) {
               double var24 = (double)(var20 + 1) * var14;
               if (var1.f() || var1.c().u()) {
                  var24 += var14 / 2.0D;
               }

               float var21;
               if (var1.p()) {
                  var21 = (float)((double)var4.d() + (double)(var20 + 1) * var14);
                  var22 = (float)((double)var4.d() + var24 - var14);
                  var23 = (float)((double)var4.d() + var24 - var14);
               } else {
                  var21 = (float)((double)(var4.d() + var4.f()) - (double)(var20 + 1) * var14);
                  var22 = (float)((double)(var4.d() + var4.f()) - var24 + var14);
                  var23 = (float)((double)(var4.d() + var4.f()) - var24 + var14);
               }

               if (var1.m != 0 && var20 % var1.H() == 0 && var20 < var1.l.size()) {
                  String var26 = "";
                  Color var27 = var16.g();
                  if (!var19) {
                     var26 = a(var1, var1.l.get(var20));
                     var27 = zpv.a(var1.l.get(var20), var16.b(), var27);
                  } else {
                     String var28 = "";
                     boolean var29 = false;
                     var28 = var20 < var17.size() ? ((zfo)var17.get(var20)).c() : "";
                     var29 = var20 < var17.size() ? ((zfo)var17.get(var20)).b() : false;
                     var26 = zpv.a(var1.c().al(), var1.l.get(var20), var28, var29);
                     var27 = zpv.a(var1.l.get(var20), var28, var27);
                  }

                  com.aspose.cells.b.a.b.zq var34 = new com.aspose.cells.b.a.b.zq(var7, var22 - var10, var1.i, var1.h);
                  if (var16.d() != 0 && var16.d() != 90 && var16.d() != -90) {
                     a(var0, var26, new com.aspose.cells.b.a.b.zo(var8, var23), new com.aspose.cells.b.a.b.zt(var1.f, var1.g), var16.d(), var16.a(), var27, var1.a());
                  } else {
                     a(var0, com.aspose.cells.b.a.b.zp.a(var34), var26, var16.d(), var16.a(), var27, var11, 1);
                  }
               }

               float var33;
               if (var20 == 0) {
                  if (var1.p()) {
                     var33 = (float)var4.d();
                  } else {
                     var33 = (float)var4.j();
                  }

                  if (var33 >= (float)var4.d() && var33 <= (float)(var4.d() + var4.f())) {
                     a(var0, var1, var2, var3, var33);
                  }

                  float var35;
                  if (!var1.p()) {
                     var35 = var33 + (float)(var14 * (double)var1.J() / 2.0D);
                  } else {
                     var35 = var33 - (float)(var14 * (double)var1.J() / 2.0D);
                  }

                  if (var35 >= (float)var4.d() && var35 <= (float)(var4.d() + var4.f())) {
                     c(var0, var1, var2, var3, var35, var4);
                  }
               }

               if ((var20 + 1) % var1.J() == 0) {
                  if (var21 >= (float)var4.d() && var21 <= (float)(var4.d() + var4.f())) {
                     a(var0, var1, var2, var3, var21);
                  }

                  if (!var1.p()) {
                     var33 = var21 + (float)(var14 * (double)var1.J() / 2.0D);
                  } else {
                     var33 = var21 - (float)(var14 * (double)var1.J() / 2.0D);
                  }

                  if (var33 >= (float)var4.d() && var33 <= (float)(var4.d() + var4.f())) {
                     c(var0, var1, var2, var3, var33, var4);
                  }
               }
            }

            if (var18 != null && var18.length > 0 && var17.size() > 0 && var1.m != 0) {
               float var31 = var9 * (float)(var18.length + 1);
               boolean var32 = false;
               var22 = (float)var4.c();
               if (var1.m == 1) {
                  var7 = (float)var4.c() - var1.f - var31;
                  var32 = true;
                  var22 = (float)var4.c();
               } else if (var1.m == 2) {
                  var7 = (float)var4.i() + var31 + var1.f;
                  var32 = false;
                  var22 = (float)var4.i();
               } else if (var1.m == 3) {
                  if (var2) {
                     var7 = var3 + var31 + var1.f;
                     var32 = false;
                  } else {
                     var7 = var3 - var31 - var1.f;
                     var32 = true;
                  }

                  var22 = var3;
               }

               if (!var1.p()) {
                  var23 = (float)var4.j();
               } else {
                  var23 = (float)var4.d();
               }

               a(var0, var18, var32, var1, var16, var14, var4, var9, var22, var7, var23);
            }

         }
      }
   }

   private static void a(zn var0, ArrayList[] var1, boolean var2, zbo var3, zbtj var4, double var5, com.aspose.cells.b.a.b.zp var7, float var8, float var9, float var10, float var11) {
      float var12 = var11;

      for(int var13 = 0; var13 < var1.length; ++var13) {
         com.aspose.cells.b.a.b.zs var14 = new com.aspose.cells.b.a.b.zs(0, 0);
         ArrayList var15 = var1[var13];

         for(int var16 = 0; var16 < var15.size(); ++var16) {
            zfo var17 = (zfo)var15.get(var16);
            int var18 = a(var17);
            float var19 = (float)((double)var18 * var5);
            String var20 = zpv.a(var3.c().al(), var17.a(), var17.c(), var17.b());
            var14 = zbsp.a(var3.c().ap(), var20, 90, var4.a(), (com.aspose.cells.b.a.b.zt)(new com.aspose.cells.b.a.b.zt((float)var7.b().b(), var19)), 1, 1);
            float var21 = var2 ? var10 : var10 - (float)var14.b();
            float var22;
            if (!var3.p()) {
               var22 = var11 - var19 / 2.0F - (float)(var14.c() / 2);
            } else {
               var22 = var11 + var19 / 2.0F - (float)(var14.c() / 2);
            }

            com.aspose.cells.b.a.b.zq var23 = new com.aspose.cells.b.a.b.zq(var21, var22, (float)var14.b(), (float)var14.c());
            a(var0, com.aspose.cells.b.a.b.zp.a(var23), var20, 90, var4.a(), var4.g(), 1, 9);
            zama.a(var0, var9, var11, var10, var11, var3.g());
            if (var3.w() != 2) {
               float var24 = var2 ? var10 + var8 + (float)var14.b() : var10 - (var8 + (float)var14.b());
               a(var0, var17.d(), var9, var24, var11, var3, var5);
            }

            if (!var3.p()) {
               var11 -= var19;
            } else {
               var11 += var19;
            }
         }

         zama.a(var0, var9, var11, var10, var11, var3.g());
         var11 = var12;
         var10 = var2 ? var10 + (float)var14.b() + var8 : var10 - (float)var14.b() - var8;
      }

   }

   private static void a(zn var0, zafs var1, float var2, float var3, float var4, zbo var5, double var6) {
      float var8 = var4;

      for(int var9 = 0; var9 < var1.getCount(); ++var9) {
         zfo var10 = (zfo)var1.a(var9);
         int var11 = a(var10);
         float var12 = (float)((double)var11 * var6);
         if (!var5.p()) {
            var8 -= var12;
         } else {
            var8 += var12;
         }

         zama.a(var0, var2, var8, var3, var8, var5.g());
      }

   }

   private static void c(zn var0, zbo var1, boolean var2, float var3, float var4, com.aspose.cells.b.a.b.zp var5) {
      zbo var6 = a(var1);
      boolean var7 = false;
      boolean var8 = false;
      switch(var1.A()) {
      case 0:
         var7 = true;
         var8 = true;
         break;
      case 1:
         var7 = true;
         if (var2) {
            var7 = false;
            var8 = true;
         }

         if (var6.o) {
            if (var2) {
               var7 = true;
               var8 = false;
            } else {
               var7 = false;
               var8 = true;
            }
         }
      case 2:
      default:
         break;
      case 3:
         var8 = true;
         if (var2) {
            var8 = false;
            var7 = true;
         }

         if (var6.o) {
            if (!var2) {
               var7 = true;
               var8 = false;
            } else {
               var7 = false;
               var8 = true;
            }
         }
      }

      if (var7) {
         zama.a(var0, var3, var4, var3 + (float)var1.Y(), var4, var1.g());
      }

      if (var8) {
         zama.a(var0, var3 - (float)var1.Y(), var4, var3, var4, var1.g());
      }

   }

   private static void b(zn var0, zbo var1, boolean var2, float var3, com.aspose.cells.b.a.b.zp var4) throws Exception {
      ArrayList var5 = var1.l;
      zif var6 = var1.c();
      zama.a(var0, var3, (float)var4.d(), var3, (float)var4.j(), var1.g());
      float var7 = 0.0F;
      float var8 = (float)var1.F().k();
      byte var9 = 8;
      if (var1.m == 1) {
         var7 = (float)var4.c() - var1.f - var8;
      } else if (var1.m == 2) {
         var7 = (float)var4.i() + var8;
         var9 = 7;
      } else if (var1.m == 3) {
         if (var2) {
            var7 = var3 + var8;
            var9 = 7;
         } else {
            var7 = var3 - var8 - var1.f;
         }
      }

      zbtj var10 = var1.F();
      boolean var13 = false;
      ArrayList var11;
      ArrayList[] var12;
      if (var1.d() == 0) {
         var11 = var6.z().c();
         var12 = var6.z().e();
         var13 = var6.z().b;
      } else {
         var11 = var6.z().d();
         var12 = var6.z().g();
         var13 = var6.z().c;
      }

      boolean var14 = false;
      if (var10.h() && var11.size() > 0) {
         var14 = true;
      }

      if (var12 != null && var12.length > 0 && var11.size() > 0) {
         var14 = true;
      }

      boolean var15 = false;
      int var16 = (int)var1.z();
      int var17 = (int)var1.D();
      int var18 = var1.j();
      int var34;
      if (!var6.e().f() && !var6.u()) {
         var34 = a(var18, var16, var17, var1.c().S());
         if (var34 == 0) {
            var34 = 1;
         }
      } else {
         var34 = a(var18, var16, var17, var1.c().S()) + 1;
      }

      double var19 = (double)var4.f() / (double)var34;
      float var21 = 0.0F;
      float var22 = 0.0F;
      float var23 = 0.0F;
      if (var1.p()) {
         var23 = (float)var4.d();
      } else {
         var23 = (float)(var4.d() + var4.f());
      }

      int var26;
      for(int var24 = 0; var24 < var5.size(); ++var24) {
         int var25 = com.aspose.cells.b.a.zo.a(com.aspose.cells.b.a.zr.a(var1.l.get(var24)));
         var26 = a(var18, var25, var17, var1.c().S());
         float var27 = (float)(var19 * (double)var26);
         var21 = (float)(var19 * (double)a(var18, a(var1.j(), var1.y(), (int)var1.x(), var25, var1.c().S()), var25, var1.c().S()));
         if (var1.f() || var6.u()) {
            var27 += (float)(var19 / 2.0D);
         }

         if (var1.p()) {
            var23 += var21;
            var22 = (float)var4.d() + var27;
         } else {
            var23 -= var21;
            var22 = (float)(var4.d() + var4.f()) - var27;
         }

         var22 -= var1.g / 2.0F;
         if (var1.m != 0 && var24 % var1.H() == 0) {
            String var28 = "";
            Color var29 = var10.g();
            if (var14 && var13) {
               String var30 = "";
               boolean var31 = false;
               var28 = a(var1, var1.l.get(var24));
               var29 = zpv.a(var1.l.get(var24), var10.b(), var29);
               Iterator var32 = var11.iterator();

               while(var32.hasNext()) {
                  zfo var33 = (zfo)var32.next();
                  if (zhz.a(var33.a(), var6.S()) == com.aspose.cells.b.a.ze.f(var1.l.get(var24))) {
                     var30 = var33.c();
                     var31 = var33.b();
                     var28 = zpv.a(var1.c().al(), var1.l.get(var24), var30, var31);
                     var29 = zpv.a(var1.l.get(var24), var30, var29);
                     break;
                  }
               }
            } else {
               var28 = a(var1, var1.l.get(var24));
               var29 = zpv.a(var1.l.get(var24), var10.b(), var29);
            }

            com.aspose.cells.b.a.b.zq var40 = new com.aspose.cells.b.a.b.zq(var7, var22, var1.f, var1.g);
            a(var0, com.aspose.cells.b.a.b.zp.a(var40), var28, var10.d(), var10.a(), var29, var9, 1);
         }

         if (var24 % var1.J() == 0 && var23 >= (float)var4.d() && var23 <= (float)(var4.d() + var4.f())) {
            a(var0, var1, var2, var3, var23);
         }
      }

      float var35;
      if (var1.p()) {
         var35 = (float)var4.d();
      } else {
         var35 = (float)(var4.d() + var4.f());
      }

      var26 = var17;
      int var37 = a(var1.j(), var1.y(), (int)var1.x(), var17, var1.c().S());

      do {
         boolean var36 = true;
         int var38 = a(var1.j(), var1.C(), (int)var1.B(), var26, var1.c().S());
         if (var38 == var37) {
            var36 = false;
            var37 = a(var1.j(), var1.y(), (int)var1.x(), var37, var1.c().S());
         }

         if (var38 >= var37) {
            var37 = a(var1.j(), var1.y(), (int)var1.x(), var37, var1.c().S());
         }

         float var39 = (float)(var19 * (double)a(var18, var38, var26, var1.c().S()));
         if (var1.p()) {
            var35 += var39;
         } else {
            var35 -= var39;
         }

         if (var36 && var35 >= (float)var4.d() && var35 <= (float)(var4.d() + var4.f())) {
            c(var0, var1, var2, var3, var35, var4);
         }

         var26 = var38;
      } while(var35 >= (float)var4.d() && var35 <= (float)(var4.d() + var4.f()));

   }

   static void c(zn var0, zbo var1, boolean var2, float var3, com.aspose.cells.b.a.b.zp var4, zbcp var5) throws Exception {
      if (!zbuk.a(var4)) {
         zama.a(var0, (float)var4.c(), var3, (float)var4.i(), var3, var1.g());
         zrm var6 = var1.Q();
         float var7 = 0.0F;
         float var8 = (float)var1.F().k();
         float var10001;
         if (var1.m == 1) {
            var7 = (float)var4.j() + var8;
            var10001 = var7 + var1.g;
            var6.b().b.b((int)var10001);
         } else if (var1.m == 2) {
            var7 = (float)var4.d() - var8 - var1.g;
            var6.b().b.b((int)var7 - var6.b().b.f());
         } else if (var1.m == 3) {
            if (var2) {
               var7 = var3 - var8 - var1.g;
               var6.b().b.b((int)var7 - var6.b().b.f());
            } else {
               var7 = var3 + var8;
               var10001 = var7 + var1.g;
               var6.b().b.b((int)var10001);
            }
         }

         var6.b().b.a(var4.i() - var6.b().b.e());
         zbtj var9 = var1.F();
         zjd var10 = var5.D().b(0);
         String var11 = var10.t();
         boolean var12 = var10.u();
         boolean var13 = false;
         if (var9.h() && var10 != null) {
            var13 = true;
         }

         ArrayList var14 = var1.l;
         double var15 = var1.n() ? zbuk.e(var1.z()) : var1.z();
         double var17 = var1.n() ? zbuk.e(var1.D()) : var1.D();
         double var19 = var1.n() ? zbuk.e(var1.x()) : var1.x();
         int var21;
         double var22;
         double var24;
         float var26;
         String var27;
         Color var28;
         com.aspose.cells.b.a.b.zq var29;
         if (!var1.p()) {
            for(var21 = 0; var21 < var14.size(); ++var21) {
               var22 = com.aspose.cells.b.a.ze.g(var14.get(var21));
               var24 = var1.n() ? zbuk.f(var22) : var22;
               if (var21 - 1 > 0) {
                  if (Math.abs(zbuk.a(var22, com.aspose.cells.b.a.ze.g(var14.get(var21 - 1)))) != var19) {
                     continue;
                  }
               } else if (var21 + 1 < var14.size() && Math.abs(zbuk.a(var22, com.aspose.cells.b.a.ze.g(var14.get(var21 + 1)))) != var19) {
                  continue;
               }

               var26 = (float)((double)var4.c() + (var22 - var17) / (var15 - var17) * (double)var4.e());
               if (var1.m != 0) {
                  var27 = "";
                  var28 = var9.g();
                  var24 = var1.n() ? var24 : var24 * Math.pow(10.0D, var1.Q().f());
                  if (var13) {
                     var27 = zpv.a(var1.c().al(), var24, var11, var12);
                     var28 = zpv.a(var24, var11, var28);
                  } else {
                     var27 = a((zbo)var1, (Object)var24);
                     var28 = zpv.a(var24, var9.b(), var28);
                  }

                  var29 = new com.aspose.cells.b.a.b.zq(var26 - var1.f / 2.0F, var7, var1.f, var1.g);
                  a(var0, com.aspose.cells.b.a.b.zp.a(var29), var27, var9.d(), var9.a(), var28, 1, 1);
               }

               a(var0, var1, var2, var26, var3, var4);
            }
         } else {
            for(var21 = var14.size() - 1; var21 >= 0; --var21) {
               var22 = com.aspose.cells.b.a.ze.g(var14.get(var21));
               var24 = var1.n() ? zbuk.f(var22) : var22;
               if (var21 - 1 > 0) {
                  if (Math.abs(zbuk.a(var22, com.aspose.cells.b.a.ze.g(var14.get(var21 - 1)))) != var19) {
                     continue;
                  }
               } else if (var21 + 1 < var14.size() && Math.abs(zbuk.a(var22, com.aspose.cells.b.a.ze.g(var14.get(var21 + 1)))) != var19) {
                  continue;
               }

               var26 = (float)((double)var4.c() + (var15 - var22) / (var15 - var17) * (double)var4.e());
               if (var1.m != 0) {
                  var27 = "";
                  var28 = var9.g();
                  var24 = var1.n() ? var24 : var24 * Math.pow(10.0D, var1.Q().f());
                  if (var13) {
                     var27 = zpv.a(var1.c().al(), var24, var11, var12);
                     var28 = zpv.a(var24, var11, var28);
                  } else {
                     var27 = a((zbo)var1, (Object)var24);
                     var28 = zpv.a(var24, var9.b(), var28);
                  }

                  var29 = new com.aspose.cells.b.a.b.zq(var26 - var1.f / 2.0F, var7, var1.f, var1.g);
                  a(var0, com.aspose.cells.b.a.b.zp.a(var29), var27, var9.d(), var9.a(), var28, 1, 1);
               }

               a(var0, var1, var2, var26, var3, var4);
            }
         }

         a(var0, var1, var2, var3, (float)var4.c(), (float)var4.i(), var4);
         zbtp.a(var1.c(), var6);
      }
   }

   static void a(zn var0, zbcr var1, zbo var2, com.aspose.cells.b.a.b.zp var3) {
      if (!zbuk.a(var3)) {
         boolean var4 = var2.E() != 3;
         if (var4) {
            zif var5 = var2.c();
            zbtj var6 = var2.F();
            zbcp var7 = var1.c(0);
            ArrayList var8;
            ArrayList[] var9;
            if (var2.d() == 0) {
               var8 = var5.z().c();
               var9 = var5.z().e();
            } else {
               var8 = var5.z().d();
               var9 = var5.z().g();
            }

            float var10 = (float)var2.F().k();
            int var11 = zhz.a((List)var1.i());
            double var12 = 6.283185307179586D / (double)var11;
            double var14 = (double)var3.c() + (double)var3.e() / 2.0D;
            double var16 = (double)var3.d() + (double)var3.f() / 2.0D;
            new com.aspose.cells.b.a.b.zo((float)var14, (float)var16);
            double var19 = 1.5707963267948966D + var12;
            double var21 = (double)(var3.e() / 2);

            for(int var23 = 0; var23 < var11; ++var23) {
               var19 -= var12;
               String var24 = "";
               Color var25 = var6.g();
               com.aspose.cells.b.a.b.zt var26 = new com.aspose.cells.b.a.b.zt(var2.f, var2.g);
               if (var6.h() && var8.size() > 0) {
                  String var27 = "";
                  boolean var28 = false;
                  var27 = var23 < var8.size() ? ((zfo)var8.get(var23)).c() : "";
                  var28 = var23 < var8.size() ? ((zfo)var8.get(var23)).b() : false;
                  var24 = zpv.a(var2.c().al(), var2.l.get(var23), var27, var28);
                  var25 = zpv.a(var2.l.get(var23), var27, var25);
               } else {
                  var24 = a(var2, var2.l.get(var23));
                  var25 = zpv.a(var2.l.get(var23), var6.b(), var25);
               }

               com.aspose.cells.b.a.b.zg var37 = var6.a();
               int var38 = var6.d();
               com.aspose.cells.b.a.b.zs var29 = zbsp.a(var2.c().ap(), var24, var38, var37, (com.aspose.cells.b.a.b.zt)var26, 1, 1);
               double var30 = (var21 + (double)var10) * Math.cos(var19);
               double var32 = (var21 + (double)var10) * Math.sin(var19);
               double var34 = var19 / 3.141592653589793D * 180.0D;
               if (var34 >= -135.0D && var34 <= -45.0D) {
                  var30 = (double)((float)(var30 + (var34 - -45.0D) * (double)var29.b() / 90.0D));
               } else if (var34 <= -225.0D && var34 >= -270.0D) {
                  var30 = (double)((float)(var30 - (var34 - -315.0D) * (double)var29.b() / 90.0D));
               } else if (var34 <= 90.0D && var34 >= 45.0D) {
                  var30 = (double)((float)(var30 - (var34 - 45.0D) * (double)var29.b() / 90.0D));
               } else if (var34 <= -135.0D && var34 >= -225.0D) {
                  var30 -= (double)var29.b();
               }

               if (var34 >= -225.0D && var34 <= -135.0D) {
                  var32 = (double)((float)(var32 - (var34 - -135.0D) * (double)var29.c() / 90.0D));
               } else if (var34 >= -45.0D && var34 <= 45.0D) {
                  var32 = (double)((float)(var32 + (var34 + 45.0D) * (double)var29.c() / 90.0D));
               } else if (var34 <= -225.0D && var34 >= -270.0D || var34 <= 90.0D && var34 >= 45.0D) {
                  var32 += (double)var29.c();
               }

               var30 += var14;
               var32 = var16 - var32;
               com.aspose.cells.b.a.b.zp var36 = new com.aspose.cells.b.a.b.zp((int)var30, (int)var32, var29.b(), var29.c());
               a(var0, var36, var24, var38, var37, var25, 1, 1);
            }

         }
      }
   }

   static void b(zn var0, zbcr var1, zbo var2, com.aspose.cells.b.a.b.zp var3) throws Exception {
      if (!zbuk.a(var3)) {
         if (var2.q()) {
            zif var4 = var2.c();
            zbcp var5 = var1.c(0);
            zbtj var6 = var2.F();
            zjd var7 = var5.D().b(0);
            boolean var8 = false;
            if (var6.h() && var7 != null) {
               var8 = true;
            }

            int var9 = zhz.a((List)var1.i());
            double var10 = 6.283185307179586D / (double)var9;
            double var12 = (double)var3.c() + (double)var3.e() / 2.0D;
            double var14 = (double)var3.d() + (double)var3.f() / 2.0D;
            com.aspose.cells.b.a.b.zo var16 = new com.aspose.cells.b.a.b.zo((float)var12, (float)var14);
            double var17 = 1.5707963267948966D + var10;
            double var19 = (double)(var3.e() / 2);

            for(int var21 = 0; var21 < var9; ++var21) {
               var17 -= var10;
               double var22 = var17 / 3.141592653589793D * 180.0D;
               double var24 = var12 + var19 * Math.cos(var17);
               double var26 = var14 - var19 * Math.sin(var17);
               com.aspose.cells.b.a.b.zo var28 = new com.aspose.cells.b.a.b.zo((float)var24, (float)var26);
               zama.a(var0, var28, var16, var2.g());
            }

            double var53 = 0.0D;
            Collections.sort(var2.l);
            double var23 = var2.S();
            double var25 = var2.T();
            double var27 = var2.V();
            double var29 = var2.W();
            ArrayList var31 = var2.l;
            double var33;
            double var35;
            double var39;
            double var41;
            if (var2.q() && var2.E() != 3) {
               for(int var32 = 0; var32 < var2.l.size(); ++var32) {
                  var33 = com.aspose.cells.b.a.ze.g(var31.get(var32));
                  var35 = var2.n() ? zbuk.f(var33) : var33;
                  if (var32 - 1 > 0) {
                     if (Math.abs(zbuk.a(var33, com.aspose.cells.b.a.ze.g(var31.get(var32 - 1)))) != var27) {
                        continue;
                     }
                  } else if (var32 + 1 < var31.size() && Math.abs(zbuk.a(var33, com.aspose.cells.b.a.ze.g(var31.get(var32 + 1)))) != var27) {
                     continue;
                  }

                  var53 = Math.abs(var33 - var25);
                  double var37 = var19 * var53 / (var23 - var25);
                  var39 = var12 + var37 * Math.cos(1.5707963267948966D);
                  var41 = var14 - var37 * Math.sin(1.5707963267948966D);
                  var35 = var2.n() ? var35 : var35 * Math.pow(10.0D, var2.Q().f());
                  String var43 = a((zbo)var2, (Object)var35);
                  Color var44 = var2.F().g();
                  var44 = zpv.a(var35, var2.F().b(), var44);
                  if (var8) {
                     var43 = zpv.a(var2.c().al(), var35, var7.z(), var7.A());
                     var44 = zpv.a(var35, var7.z(), var44);
                  }

                  com.aspose.cells.b.a.b.zg var45 = var2.F().a();
                  int var46 = var2.F().d();
                  com.aspose.cells.b.a.b.zs var47 = zbsp.b(var2.c().ap(), var43, var46, var45, (com.aspose.cells.b.a.b.zs)var3.b(), 1, 1);
                  var47.a(var47.b() + var2.Z() * 2);
                  var39 = var39 - (double)var47.b() - (double)var2.c().a() * 0.011D;
                  var41 -= (double)(var47.c() / 2);
                  com.aspose.cells.b.a.b.zp var48 = new com.aspose.cells.b.a.b.zp((int)var39, (int)var41, var47.b(), var47.c());
                  a(var0, var48, var43, var46, var45, var44, 1, 1, com.aspose.cells.b.a.b.zv.c());
                  var17 = 1.5707963267948966D;
               }
            }

            zbo var54 = var2;
            int var38;
            double var50;
            com.aspose.cells.b.a.b.zo var52;
            com.aspose.cells.b.a.b.zo var55;
            double var56;
            double var57;
            com.aspose.cells.b.a.b.zo var58;
            double var59;
            if (var2.c().d && var2 == var2.c().E()) {
               var53 = 0.0D;
               var23 = var2.n() ? zbuk.e(var2.b) : var2.b;
               var25 = var2.n() ? zbuk.e(var2.c) : var2.c;
               var27 = var2.n() ? zbuk.e(var2.d) : var2.d;
               var29 = var2.n() ? zbuk.e(var2.e) : var2.e;
               if (var27 > 0.0D) {
                  for(var33 = var25 + var27; var33 <= var23; var33 = zbuk.b(var33, var27)) {
                     var53 = Math.abs(var33 - var25);
                     var35 = var19 * var53 / (var23 - var25);
                     var17 = 1.5707963267948966D;
                     var55 = com.aspose.cells.b.a.b.zo.a();

                     for(var38 = 0; var38 < var9; ++var38) {
                        if (!var54.s().e() && var54.w() != 2 && !var54.u().e() && var54.q()) {
                           var39 = Math.atan((double)var54.X() / var35);
                           var41 = Math.sqrt(Math.pow(var35, 2.0D) + Math.pow((double)var54.X(), 2.0D));
                           var56 = var12 + var41 * Math.cos(var17 + var39);
                           var57 = var14 - var41 * Math.sin(var17 + var39);
                           var58 = new com.aspose.cells.b.a.b.zo((float)var56, (float)var57);
                           var59 = var12 + var41 * Math.cos(var17 - var39);
                           var50 = var14 - var41 * Math.sin(var17 - var39);
                           var52 = new com.aspose.cells.b.a.b.zo((float)var59, (float)var50);
                           zama.a(var0, var58, var52, var54.g());
                        }

                        var17 -= var10;
                     }
                  }
               }

               if (var29 > 0.0D) {
                  for(var33 = var25 + var29; var33 <= var23; var33 = zbuk.b(var33, var29)) {
                     var53 = Math.abs(var33 - var25);
                     var35 = var19 * var53 / (var23 - var25);
                     var17 = 1.5707963267948966D;
                     var55 = com.aspose.cells.b.a.b.zo.a();

                     for(var38 = 0; var38 < var9; ++var38) {
                        if (!var54.u().e() && var54.A() != 2 && var54.q()) {
                           var39 = Math.atan((double)var54.Y() / var35);
                           var41 = Math.sqrt(Math.pow(var35, 2.0D) + Math.pow((double)var54.Y(), 2.0D));
                           var56 = var12 + var41 * Math.cos(var17 + var39);
                           var57 = var14 - var41 * Math.sin(var17 + var39);
                           var58 = new com.aspose.cells.b.a.b.zo((float)var56, (float)var57);
                           var59 = var12 + var41 * Math.cos(var17 - var39);
                           var50 = var14 - var41 * Math.sin(var17 - var39);
                           var52 = new com.aspose.cells.b.a.b.zo((float)var59, (float)var50);
                           zama.a(var0, var58, var52, var54.g());
                        }

                        var17 -= var10;
                     }
                  }
               }
            } else {
               var53 = 0.0D;
               var23 = var2.S();
               var25 = var2.T();
               var27 = var2.V();
               var29 = var2.W();
               if (var27 > 0.0D) {
                  for(var33 = var25 + var27; var33 <= var23; var33 = zbuk.b(var33, var27)) {
                     var53 = Math.abs(var33 - var25);
                     var35 = var19 * var53 / (var23 - var25);
                     var17 = 1.5707963267948966D;
                     var55 = com.aspose.cells.b.a.b.zo.a();

                     for(var38 = 0; var38 < var9; ++var38) {
                        if (!var54.s().e() && var54.w() != 2 && !var54.u().e() && var54.q()) {
                           var39 = Math.atan((double)var54.X() / var35);
                           var41 = Math.sqrt(Math.pow(var35, 2.0D) + Math.pow((double)var54.X(), 2.0D));
                           var56 = var12 + var41 * Math.cos(var17 + var39);
                           var57 = var14 - var41 * Math.sin(var17 + var39);
                           var58 = new com.aspose.cells.b.a.b.zo((float)var56, (float)var57);
                           var59 = var12 + var41 * Math.cos(var17 - var39);
                           var50 = var14 - var41 * Math.sin(var17 - var39);
                           var52 = new com.aspose.cells.b.a.b.zo((float)var59, (float)var50);
                           zama.a(var0, var58, var52, var54.g());
                        }

                        var17 -= var10;
                     }
                  }
               }

               if (var29 > 0.0D) {
                  for(var33 = var25 + var29; var33 <= var23; var33 = zbuk.b(var33, var29)) {
                     var53 = Math.abs(var33 - var25);
                     var35 = var19 * var53 / (var23 - var25);
                     var17 = 1.5707963267948966D;
                     var55 = com.aspose.cells.b.a.b.zo.a();

                     for(var38 = 0; var38 < var9; ++var38) {
                        if (!var54.u().e() && var54.A() != 2 && var54.q()) {
                           var39 = Math.atan((double)var54.Y() / var35);
                           var41 = Math.sqrt(Math.pow(var35, 2.0D) + Math.pow((double)var54.Y(), 2.0D));
                           var56 = var12 + var41 * Math.cos(var17 + var39);
                           var57 = var14 - var41 * Math.sin(var17 + var39);
                           var58 = new com.aspose.cells.b.a.b.zo((float)var56, (float)var57);
                           var59 = var12 + var41 * Math.cos(var17 - var39);
                           var50 = var14 - var41 * Math.sin(var17 - var39);
                           var52 = new com.aspose.cells.b.a.b.zo((float)var59, (float)var50);
                           zama.a(var0, var58, var52, var54.g());
                        }

                        var17 -= var10;
                     }
                  }
               }
            }

         }
      }
   }

   static com.aspose.cells.b.a.b.zs a(zn var0, zbo var1, zbcp var2, boolean var3) throws Exception {
      if (var1.q() && var1.E() != 3 && !var1.c().B().D()) {
         zif var4 = var1.c();
         zjd var5 = var2.D().b(0);
         int var6 = var2.ag();
         zbtj var7 = var1.F();
         String var8 = var5.z();
         boolean var9 = var5.A();
         boolean var10 = false;
         if (var7.h() && var5 != null) {
            var10 = true;
         }

         int var11 = 0;
         int var12 = 0;
         ArrayList var13 = var1.l;
         if (var1.n()) {
            zbuk.e(var1.z());
         } else {
            var1.z();
         }

         if (var1.n()) {
            zbuk.e(var1.D());
         } else {
            var1.D();
         }

         double var18 = var1.n() ? zbuk.e(var1.x()) : var1.x();
         double var20 = 1.0E-10D;

         for(int var22 = 0; var22 < var1.l.size(); ++var22) {
            double var23 = com.aspose.cells.b.a.ze.g(var13.get(var22));
            double var25 = var1.n() ? zbuk.f(var23) : var23;
            if (var22 - 1 > 0) {
               if (Math.abs(zbuk.a(var18, Math.abs(zbuk.a(var23, com.aspose.cells.b.a.ze.g(var13.get(var22 - 1)))))) / var18 > 1.0E10D) {
                  continue;
               }
            } else if (var22 + 1 < var13.size() && Math.abs(zbuk.a(var18, Math.abs(zbuk.a(var23, com.aspose.cells.b.a.ze.g(var13.get(var22 + 1)))))) / var20 > 1.0E10D) {
               continue;
            }

            if (zhz.b(var6)) {
               var25 /= 100.0D;
               var8 = "0%";
            }

            String var27 = "";
            var25 = var1.n() ? var25 : var25 * Math.pow(10.0D, var1.Q().f());
            Color var28 = var7.g();
            if (var10) {
               var27 = zpv.a(var1.c().al(), var25, var8, var9);
               zpv.a(var25, var8, var28);
            } else {
               var27 = a((zbo)var1, (Object)var25);
               var28 = zpv.a(var25, var7.b(), var28);
            }

            com.aspose.cells.b.a.b.zs var29 = com.aspose.cells.b.a.b.zs.a();
            var29 = zbsp.b(var1.c().ap(), var27, var7.d(), var7.a(), (com.aspose.cells.b.a.b.zs)var1.c().B().b.b(), 1, 1);
            var29.a(var29.b() + var1.Z() * 2);
            if (var29.b() > var11) {
               var11 = var29.b();
            }

            if (var29.c() > var12) {
               var12 = var29.c();
            }
         }

         if (var3) {
            var12 += (int)((double)(2 * var1.X()) + 0.5D);
         } else {
            var11 += (int)((double)(2 * var1.X()) + 0.5D);
         }

         var1.f = (float)var11;
         var1.g = (float)var12;
         return new com.aspose.cells.b.a.b.zs(var11, var12);
      } else {
         return new com.aspose.cells.b.a.b.zs(0, 0);
      }
   }

   static com.aspose.cells.b.a.b.zs a(zn var0, zbo var1, com.aspose.cells.b.a.b.zp var2, int var3, boolean var4, zbcp var5) throws Exception {
      if (var1.q() && var1.E() != 3 && !zbuk.a(var2)) {
         boolean var6 = false;
         if (var1.k() == 2) {
            var6 = true;
            var1.f(false);
            var1.k(1);
         }

         ArrayList var7 = (ArrayList)var1.l.clone();
         if (var1.n()) {
            for(int var8 = 0; var8 < var7.size(); ++var8) {
               var7.set(var8, zbuk.f(com.aspose.cells.b.a.ze.g(var7.get(var8))));
            }
         }

         zif var48 = var1.c();
         boolean var11 = false;
         ArrayList var9;
         ArrayList[] var10;
         if (var1.d() == 0) {
            var9 = var48.z().c();
            var10 = var48.z().e();
            var11 = var48.z().b;
         } else {
            var9 = var48.z().d();
            var10 = var48.z().g();
            var11 = var48.z().c;
         }

         boolean var12 = false;
         if (var10 != null && var10.length > 0 && var9.size() > 0 && var1.m != 0) {
            var12 = true;
         }

         zbtj var13 = var1.F();
         float var14 = zjl.a(var48, var4);
         String var15 = var5.D().a(0).t();
         boolean var16 = var5.D().a(0).u();
         String var17 = "";
         boolean var18 = false;
         boolean var19 = false;
         if (var5.ag() != 60 && var5.ag() != 12) {
            if (var13.h() && var9.size() > 0) {
               var19 = true;
            }

            if (var10 != null && var10.length > 0 && var9.size() > 0) {
               var19 = true;
            }
         } else if (var13.h()) {
            var19 = true;
         }

         com.aspose.cells.b.a.b.zt var20 = new com.aspose.cells.b.a.b.zt(0.0F, 0.0F);
         boolean var21 = false;
         int var49;
         if (!var6) {
            if (!var1.f() && !var48.u()) {
               var49 = var3 - 1;
               if (var49 == 0) {
                  var49 = 1;
               }
            } else {
               var49 = var3;
            }
         } else {
            var49 = var7.size();
         }

         int var22 = b(var1);
         int var23 = 1;
         if (!var5.av()) {
            float var24;
            if (var4) {
               if ((float)var2.f() / (float)var49 < 1.0F) {
                  var24 = (float)var2.f() / (float)var49 * 10.0F;
                  var23 *= 10;
                  if (var24 < 1.0F) {
                     var24 = (float)var2.e() / (float)var49 * 10.0F;
                     var23 *= 10;
                  }
               }
            } else if ((float)var2.e() / (float)var49 < 1.0F) {
               var24 = (float)var2.e() / (float)var49 * 10.0F;
               var23 *= 10;
               if (var24 < 1.0F) {
                  var24 = (float)var2.e() / (float)var49 * 10.0F;
                  var23 *= 10;
               }
            }
         }

         int var50 = 0;
         int var25 = 0;
         int var26 = 0;
         int var27 = 0;
         float var28;
         int var29;
         int var30;
         float var31;
         boolean var32;
         com.aspose.cells.b.a.b.zs var33;
         int var34;
         float var72;
         if (var13.j()) {
            var28 = 0.55F;
            var29 = 0;
            var30 = 0;
            var31 = 0.0F;
            var32 = false;
            var33 = zbsp.a(var0, "a", var13.a());
            var34 = 0;
            float[][] var35 = new float[var7.size()][2];
            com.aspose.cells.b.a.b.zs[] var36 = new com.aspose.cells.b.a.b.zs[var7.size()];
            String[] var37 = new String[var7.size()];

            int var42;
            label880:
            while(true) {
               while(true) {
                  var50 = 0;
                  var25 = 0;
                  var26 = 0;
                  var27 = 0;
                  float var38 = 0.0F;
                  if (var5.av()) {
                     com.aspose.cells.b.a.b.zt var39 = zbsp.d(var0, "3", var13.a());
                     if (var4) {
                        var20.b((float)var2.f() / (float)var7.size());
                        var20.a((float)var2.e() * var28);
                        var20.b(var20.c() + (float)zbuk.a((double)var39.c()));
                        var38 = var20.c();
                     } else {
                        var20.a((float)var2.e() / (float)var7.size());
                        var20.b((float)var2.f() * var28);
                        var20.a(var20.b() + (float)zbuk.a((double)var39.b()));
                        var38 = var20.b();
                     }
                  } else if (var4) {
                     var20.b((float)var2.f() / (float)var49 * (float)var1.H());
                     var20.a((float)var2.e() * var28);
                     if (var1.I()) {
                        if (Math.abs(var13.d()) == 0 && var1.H() < var49) {
                           if (var20.c() < (float)var33.c()) {
                              var1.k(var1.H() + var23);
                              continue;
                           }
                        } else if (Math.abs(var13.d()) == 90 && var20.c() < (float)var33.b() && var1.H() < var49) {
                           var1.k(var1.H() + var23);
                           continue;
                        }
                     }

                     var38 = var20.c();
                  } else {
                     if (var22 > var1.H()) {
                        var20.a((float)var2.e() / (float)var49 * (float)var22);
                     } else {
                        var20.a((float)var2.e() / (float)var49 * (float)var1.H());
                     }

                     var20.b((float)var2.f() * var28);
                     if (var1.I()) {
                        if (Math.abs(var13.d()) == 0) {
                           if (var20.b() < (float)var33.b()) {
                              var1.k(var1.H() + var23);
                              continue;
                           }
                        } else if (Math.abs(var13.d()) == 90 && var20.b() < (float)var33.c()) {
                           var1.k(var1.H() + var23);
                           continue;
                        }
                     }

                     var38 = var20.b();
                  }

                  var72 = 0.0F;
                  if (var13.d() == 45) {
                     if (var5.av()) {
                        if (var4) {
                           var72 = (float)(var2.f() / var7.size());
                        } else {
                           var72 = (float)(var2.e() / var7.size());
                        }
                     } else if (var4) {
                        var72 = (float)(var2.f() / var49);
                     } else {
                        var72 = (float)(var2.e() / var49);
                     }
                  }

                  float var40 = 0.0F;
                  float var41 = 0.0F;

                  for(var42 = 0; var42 < var7.size(); ++var42) {
                     if (var13.d() == 45) {
                        int var43 = var7.size() - 1 - var42;
                        if (var4) {
                           if (var1.p()) {
                              if (var13.d() > 0) {
                                 var20.a((float)var2.e() * var28);
                                 var20.b((float)var2.f() - (float)var42 * var72 - var72 / 2.0F);
                              } else {
                                 var20.a((float)var2.e() * var28);
                                 var20.b((float)var2.f() - (float)var43 * var72 - var72 / 2.0F);
                              }
                           } else if (var13.d() > 0) {
                              var20.a((float)var2.e() * var28);
                              var20.b((float)var2.f() - (float)var43 * var72 - var72 / 2.0F);
                           } else {
                              var20.a((float)var2.e() * var28);
                              var20.b((float)var2.f() - (float)var42 * var72 - var72 / 2.0F);
                           }
                        } else if (var1.p()) {
                           if (var13.d() > 0) {
                              var20.a((float)var2.e() - (float)var42 * var72 - var72 / 2.0F);
                              var20.b((float)var2.f() * var28);
                           } else {
                              var20.a((float)var2.e() - (float)var43 * var72 - var72 / 2.0F);
                              var20.b((float)var2.f() * var28);
                           }
                        } else if (var13.d() > 0) {
                           var20.a((float)var2.e() - (float)var43 * var72 - var72 / 2.0F);
                           var20.b((float)var2.f() * var28);
                        } else {
                           var20.a((float)var2.e() - (float)var42 * var72 - var72 / 2.0F);
                           var20.b((float)var2.f() * var28);
                        }

                        if (var20.b() < (float)var2.e() * var28) {
                           var20.a((float)var2.e() * var28);
                        }

                        if (var20.c() < (float)var2.f() * var28) {
                           var20.b((float)var2.f() * var28);
                        }
                     }

                     if (var42 == 0 && var34 <= 0) {
                        var1.F().d(zbuk.a((double)((float)(var33.b() * var1.F().c()) / var14)));
                     }

                     String var78;
                     if (var34 > 0 && var37[var42] != null) {
                        var78 = var37[var42];
                     } else {
                        var78 = "";
                        if (var6) {
                           if (var19 && var11) {
                              var78 = a(var1, var7.get(var42));
                              Iterator var44 = var9.iterator();

                              while(var44.hasNext()) {
                                 zfo var45 = (zfo)var44.next();
                                 if (zhz.a(var45.a(), var48.S()) == com.aspose.cells.b.a.ze.f(var7.get(var42))) {
                                    var17 = var45.c();
                                    var18 = var45.b();
                                    var78 = zpv.a(var1.c().al(), var7.get(var42), var17, var18);
                                    break;
                                 }
                              }
                           } else {
                              var78 = a(var1, var7.get(var42));
                           }
                        } else if (var19) {
                           var17 = var42 < var9.size() ? ((zfo)var9.get(var42)).c() : "";
                           var18 = var42 < var9.size() ? ((zfo)var9.get(var42)).b() : false;
                           if (var5.ag() != 60 && var5.ag() != 12) {
                              var78 = zpv.a(var1.c().al(), var7.get(var42), var17, var18);
                           } else {
                              var78 = zpv.a(var1.c().al(), com.aspose.cells.b.a.ze.g(var7.get(var42)) * Math.pow(10.0D, var1.Q().f()), var15, var16);
                           }
                        } else {
                           var78 = a(var1, var7.get(var42));
                        }

                        var37[var42] = var78;
                     }

                     float var80;
                     float var83;
                     if (var34 <= 0) {
                        var80 = zbsp.c(var0, var78, var13.a());
                        var83 = zbsp.b(var0, var78, var13.a()).b();
                        var35[var42][0] = var80;
                        var35[var42][1] = var83;
                     } else {
                        var80 = var35[var42][0];
                        var83 = var35[var42][1];
                     }

                     if (var80 > var40) {
                        var40 = var80;
                     }

                     if (var83 > var41) {
                        var41 = var83;
                     }

                     if (var12 && var13.d() == 0 && !var4) {
                        var20.a(var20.b() + 1.0F);
                     }

                     new com.aspose.cells.b.a.b.zs(0, 0);
                     com.aspose.cells.b.a.b.zs var46;
                     if (var11) {
                        var46 = zbsp.a(var0, var78, var13.d(), var13.a(), (com.aspose.cells.b.a.b.zt)var20, 1, 1);
                     } else if (var34 <= 0) {
                        var46 = zbsp.a(var0, var78, var13.a());
                        var36[var42] = var46;
                     } else {
                        var46 = var36[var42];
                     }

                     if (var46.b() > var50) {
                        var50 = var46.b();
                     }

                     if (var46.c() > var25) {
                        var25 = var46.c();
                     }

                     if (var42 == 0) {
                        if (var4) {
                           var26 = var46.c() / 2;
                        } else {
                           var26 = var46.b() / 2;
                        }
                     }

                     if (var42 == var7.size() - 1) {
                        if (var4) {
                           var27 = var46.c() / 2;
                        } else {
                           var27 = var46.b() / 2;
                        }
                     }

                     if (var12 && var42 == 0 && var13.d() == 0 && !var4) {
                        --var34;
                        break;
                     }
                  }

                  ++var34;
                  var1.h = (float)var25;
                  var1.i = (float)var50;
                  if (var11 && var38 < var40) {
                     double var76;
                     double var82;
                     if (var4) {
                        if (var13.d() == 0 && (float)var25 > (float)var33.c() * 1.5F) {
                           var13.b(45);
                           continue;
                        }

                        if (var13.d() == 45) {
                           var76 = (double)Math.abs(var13.d()) / 180.0D * 3.141592653589793D;
                           var82 = (double)var41 * Math.cos(var76) + (double)var33.c() * Math.sin(var76);
                           if (var82 > (double)var50) {
                              var13.b(90);
                              continue;
                           }
                        }
                     } else {
                        if (var13.d() == 0 && (float)var25 > (float)var33.c() * 1.5F) {
                           var13.b(45);
                           continue;
                        }

                        if (var13.d() == 45) {
                           var76 = (double)Math.abs(var13.d()) / 180.0D * 3.141592653589793D;
                           if (var12) {
                              var82 = (double)var41 * Math.cos(var76) + (double)var33.c() * Math.sin(var76);
                              if (var82 > (double)var50) {
                                 var13.b(90);
                                 continue;
                              }
                           } else {
                              var82 = (double)var41 * Math.cos(var76) + (double)var33.c() * Math.sin(var76);
                              if (var82 > (double)((float)var2.f() * 0.3F) && (double)var38 > 2.5D * (double)var33.c()) {
                                 var13.b(90);
                                 continue;
                              }

                              double var84 = (double)var33.c() * Math.cos(var76) * 2.0D + 3.0D;
                              if (var84 > (double)var38) {
                                 var13.b(90);
                                 continue;
                              }
                           }
                        }
                     }
                  } else if (var4) {
                     if ((double)(var20.c() / (float)var25) > 2.5D && (double)var28 > 0.2D && var20.b() * 4.0F / 5.0F > var40) {
                        var28 = var28 * 4.0F / 5.0F;
                        continue;
                     }
                  } else if (var20.b() / (float)var50 > 2.0F && (double)var28 > 0.3D) {
                     var28 = var28 * 4.0F / 5.0F;
                     continue;
                  }

                  if (!var1.I() || var32) {
                     break label880;
                  }

                  if (var4) {
                     if ((var50 != var29 || var25 != var30 || var31 != var20.c()) && (float)var25 > var20.c() - 5.0F && var1.H() < var49) {
                        var29 = var50;
                        var30 = var25;
                        var31 = var20.c();
                        var1.k(var1.H() + var23);
                     } else {
                        if (var1.H() <= 1) {
                           break label880;
                        }

                        var1.k(var1.H() - var23);
                        if (var1.H() < 1) {
                           var1.k(1);
                        }

                        var32 = true;
                     }
                  } else if ((var50 != var29 || var25 != var30 || var31 != var20.b()) && (float)var50 > var20.b() - 5.0F && var1.H() < var49) {
                     var29 = var50;
                     var30 = var25;
                     var31 = var20.b();
                     var1.k(var1.H() + var23);
                  } else {
                     if (var1.H() <= 1) {
                        break label880;
                     }

                     var1.k(var1.H() - var23);
                     if (var1.H() < 1) {
                        var1.k(1);
                     }

                     var32 = true;
                  }
               }
            }

            if (var1.p()) {
               var42 = var26;
               var26 = var27;
               var27 = var42;
            }
         } else {
            float var67;
            if (var13.d() != 0 && var13.d() != 90 && var13.d() != -90) {
               if (var13.d() == 255) {
                  com.aspose.cells.b.a.b.zs var51 = zbsp.a(var0, "H", var13.a());
                  String var53 = "";

                  for(var30 = 0; var30 < var7.size(); var30 += var1.H()) {
                     if (var30 == 0) {
                        var1.F().d(zbuk.c((double)((float)(var51.b() * var1.F().c()) / var14)));
                     }

                     String var56 = "";
                     if (var6) {
                        if (var19 && var11) {
                           var56 = a(var1, var7.get(var30));
                           Iterator var58 = var9.iterator();

                           while(var58.hasNext()) {
                              zfo var57 = (zfo)var58.next();
                              if (zhz.a(var57.a(), var48.S()) == com.aspose.cells.b.a.ze.f(var7.get(var30))) {
                                 var17 = var57.c();
                                 var18 = var57.b();
                                 var56 = zpv.a(var1.c().al(), var7.get(var30), var17, var18);
                                 break;
                              }
                           }
                        } else {
                           var56 = a(var1, var7.get(var30));
                        }
                     } else if (var19) {
                        var17 = var30 < var9.size() ? ((zfo)var9.get(var30)).c() : "";
                        var18 = var30 < var9.size() ? ((zfo)var9.get(var30)).b() : false;
                        if (var5.av()) {
                           var56 = zpv.a(var1.c().al(), com.aspose.cells.b.a.ze.g(var7.get(var30)) * Math.pow(10.0D, var1.Q().f()), var15, var16);
                        } else {
                           var56 = zpv.a(var1.c().al(), var7.get(var30), var17, var18);
                        }
                     } else {
                        var56 = a(var1, var7.get(var30));
                     }

                     if (var56.length() > var53.length()) {
                        var53 = var56;
                     }
                  }

                  var50 = var51.b();
                  var25 = var53.length() * var51.c();
                  if (var25 > var2.f() / 2) {
                     var25 = var2.f() / 2;
                  }

                  var1.h = (float)var25;
                  var1.i = (float)var50;
               } else {
                  var28 = 0.5F;
                  com.aspose.cells.b.a.b.zs var54 = zbsp.a(var0, "a", var13.a());
                  float var55 = 0.0F;

                  label1048: {
                     while(!var5.av()) {
                        if (var4) {
                           var55 = (float)var2.f() / (float)var49 * (float)var1.H();
                        } else {
                           var55 = (float)var2.e() / (float)var49 * (float)var1.H();
                        }

                        if (!var1.I() || var1.H() >= var49 || var55 >= (float)var54.c()) {
                           break label1048;
                        }

                        var1.k(var1.H() + var23);
                     }

                     com.aspose.cells.b.a.b.zt var62 = zbsp.d(var0, "3", var13.a());
                     if (var4) {
                        var55 = (float)var2.f() / (float)var7.size();
                        var55 += var62.c();
                     } else {
                        var55 = (float)var2.e() / (float)var7.size();
                        var55 += var62.b();
                     }
                  }

                  for(int var64 = 0; var64 < var7.size(); ++var64) {
                     int var60 = var7.size() - 1 - var64;
                     if (var4) {
                        if (var1.p()) {
                           if (var13.d() > 0) {
                              var20.a((float)var2.e() * var28);
                              var20.b((float)var2.f() - (float)var64 * var55 - var55 / 2.0F);
                           } else {
                              var20.a((float)var2.e() * var28);
                              var20.b((float)var2.f() - (float)var60 * var55 - var55 / 2.0F);
                           }
                        } else if (var13.d() > 0) {
                           var20.a((float)var2.e() * var28);
                           var20.b((float)var2.f() - (float)var60 * var55 - var55 / 2.0F);
                        } else {
                           var20.a((float)var2.e() * var28);
                           var20.b((float)var2.f() - (float)var64 * var55 - var55 / 2.0F);
                        }
                     } else if (var1.p()) {
                        if (var13.d() > 0) {
                           var20.a((float)var2.e() - (float)var64 * var55 - var55 / 2.0F);
                           var20.b((float)var2.f() * var28);
                        } else {
                           var20.a((float)var2.e() - (float)var60 * var55 - var55 / 2.0F);
                           var20.b((float)var2.f() * var28);
                        }
                     } else if (var13.d() > 0) {
                        var20.a((float)var2.e() - (float)var60 * var55 - var55 / 2.0F);
                        var20.b((float)var2.f() * var28);
                     } else {
                        var20.a((float)var2.e() - (float)var64 * var55 - var55 / 2.0F);
                        var20.b((float)var2.f() * var28);
                     }

                     if (var20.b() < (float)var2.e() * var28) {
                        var20.a((float)var2.e() * var28);
                     }

                     if (var20.c() < (float)var2.f() * var28) {
                        var20.b((float)var2.f() * var28);
                     }

                     if (var64 == 0) {
                        var1.F().d(zbuk.a((double)((float)(var54.b() * var1.F().c()) / var14)));
                     }

                     String var59 = "";
                     if (var6) {
                        if (var19 && var11) {
                           var59 = a(var1, var7.get(var64));
                           Iterator var65 = var9.iterator();

                           while(var65.hasNext()) {
                              zfo var63 = (zfo)var65.next();
                              if (zhz.a(var63.a(), var48.S()) == com.aspose.cells.b.a.ze.f(var7.get(var64))) {
                                 var17 = var63.c();
                                 var18 = var63.b();
                                 var59 = zpv.a(var1.c().al(), var7.get(var64), var17, var18);
                                 break;
                              }
                           }
                        } else {
                           var59 = a(var1, var7.get(var64));
                        }
                     } else if (var19) {
                        var17 = var64 < var9.size() ? ((zfo)var9.get(var64)).c() : "";
                        var18 = var64 < var9.size() ? ((zfo)var9.get(var64)).b() : false;
                        if (var5.ag() != 60 && var5.ag() != 12) {
                           var59 = zpv.a(var1.c().al(), var7.get(var64), var17, var18);
                        } else {
                           var59 = zpv.a(var1.c().al(), com.aspose.cells.b.a.ze.g(var7.get(var64)) * Math.pow(10.0D, var1.Q().f()), var15, var16);
                        }
                     } else {
                        var59 = a(var1, var7.get(var64));
                     }

                     com.aspose.cells.b.a.b.zs var68 = zbsp.a(var0, var59, var13.d(), var13.a(), (com.aspose.cells.b.a.b.zt)var20, 1, 1);
                     if (var68.b() > var50) {
                        var50 = var68.b();
                     }

                     if (var68.c() > var25) {
                        var25 = var68.c();
                     }

                     int var66 = var50;
                     if (var4) {
                        var66 = var25;
                     }

                     float var73;
                     switch(var1.a()) {
                     case 0:
                        if (var1.p()) {
                           if (var13.d() > 0) {
                              var67 = (float)var60 * var55 + var55 / 2.0F;
                              if ((float)var66 > var67) {
                                 var73 = (float)var66 - var67;
                                 if (var73 > (float)var26) {
                                    var26 = (int)var73;
                                 }
                              }
                           } else {
                              var67 = (float)var64 * var55 + var55 / 2.0F;
                              if ((float)var66 > var67) {
                                 var73 = (float)var66 - var67;
                                 if (var73 > (float)var27) {
                                    var27 = (int)var73;
                                 }
                              }
                           }
                        } else if (var13.d() > 0) {
                           var67 = (float)var64 * var55 + var55 / 2.0F;
                           if ((float)var66 > var67) {
                              var73 = (float)var66 - var67;
                              if (var73 > (float)var26) {
                                 var26 = (int)var73;
                              }
                           }
                        } else {
                           var67 = (float)var60 * var55 + var55 / 2.0F;
                           if ((float)var66 > var67) {
                              var73 = (float)var66 - var67;
                              if (var73 > (float)var27) {
                                 var27 = (int)var73;
                              }
                           }
                        }
                        break;
                     case 1:
                        if (var1.p()) {
                           if (var13.d() > 0) {
                              var67 = (float)var60 * var55 + var55 / 2.0F;
                              if ((float)var66 > var67) {
                                 var73 = (float)var66 - var67;
                                 if (var73 > (float)var26) {
                                    var26 = (int)var73;
                                 }
                              }
                           } else {
                              var67 = (float)var64 * var55 + var55 / 2.0F;
                              if ((float)var66 > var67) {
                                 var73 = (float)var66 - var67;
                                 if (var73 > (float)var27) {
                                    var27 = (int)var73;
                                 }
                              }
                           }
                        } else if (var13.d() > 0) {
                           var67 = (float)var64 * var55 + var55 / 2.0F;
                           if ((float)var66 > var67) {
                              var73 = (float)var66 - var67;
                              if (var73 > (float)var26) {
                                 var26 = (int)var73;
                              }
                           }
                        } else {
                           var67 = (float)var60 * var55 + var55 / 2.0F;
                           if ((float)var66 > var67) {
                              var73 = (float)var66 - var67;
                              if (var73 > (float)var27) {
                                 var27 = (int)var73;
                              }
                           }
                        }
                        break;
                     case 2:
                        if (var1.p()) {
                           if (var13.d() < 0) {
                              var67 = (float)var60 * var55 + var55 / 2.0F;
                              if ((float)var66 > var67) {
                                 var73 = (float)var66 - var67;
                                 if (var73 > (float)var26) {
                                    var26 = (int)var73;
                                 }
                              }
                           } else {
                              var67 = (float)var64 * var55 + var55 / 2.0F;
                              if ((float)var66 > var67) {
                                 var73 = (float)var66 - var67;
                                 if (var73 > (float)var27) {
                                    var27 = (int)var73;
                                 }
                              }
                           }
                        } else if (var13.d() < 0) {
                           var67 = (float)var64 * var55 + var55 / 2.0F;
                           if ((float)var66 > var67) {
                              var73 = (float)var66 - var67;
                              if (var73 > (float)var26) {
                                 var26 = (int)var73;
                              }
                           }
                        } else {
                           var67 = (float)var60 * var55 + var55 / 2.0F;
                           if ((float)var66 > var67) {
                              var73 = (float)var66 - var67;
                              if (var73 > (float)var27) {
                                 var27 = (int)var73;
                              }
                           }
                        }
                        break;
                     case 3:
                        if (var1.p()) {
                           if (var13.d() < 0) {
                              var67 = (float)var60 * var55 + var55 / 2.0F;
                              if ((float)var66 > var67) {
                                 var73 = (float)var66 - var67;
                                 if (var73 > (float)var26) {
                                    var26 = (int)var73;
                                 }
                              }
                           } else {
                              var67 = (float)var64 * var55 + var55 / 2.0F;
                              if ((float)var66 > var67) {
                                 var73 = (float)var66 - var67;
                                 if (var73 > (float)var27) {
                                    var27 = (int)var73;
                                 }
                              }
                           }
                        } else if (var13.d() < 0) {
                           var67 = (float)var64 * var55 + var55 / 2.0F;
                           if ((float)var66 > var67) {
                              var73 = (float)var66 - var67;
                              if (var73 > (float)var26) {
                                 var26 = (int)var73;
                              }
                           }
                        } else {
                           var67 = (float)var60 * var55 + var55 / 2.0F;
                           if ((float)var66 > var67) {
                              var73 = (float)var66 - var67;
                              if (var73 > (float)var27) {
                                 var27 = (int)var73;
                              }
                           }
                        }
                     }
                  }

                  var1.i = (float)var50;
                  var1.h = (float)var25;
               }
            } else {
               var28 = 0.5F;
               var29 = 0;
               var30 = 0;
               var31 = 0.0F;
               var32 = false;
               var33 = zbsp.a(var0, "a", var13.a());
               var34 = 0;
               String[] var61 = new String[var7.size()];
               var67 = 0.0F;

               int var70;
               String var74;
               zfo var75;
               Iterator var79;
               for(var70 = 0; var70 < var7.size(); var70 += var1.H()) {
                  var74 = "";
                  if (var6) {
                     if (var19 && var11) {
                        var74 = a(var1, var7.get(var70));
                        var79 = var9.iterator();

                        while(var79.hasNext()) {
                           var75 = (zfo)var79.next();
                           if (zhz.a(var75.a(), var48.S()) == com.aspose.cells.b.a.ze.f(var7.get(var70))) {
                              var17 = var75.c();
                              var18 = var75.b();
                              var74 = zpv.a(var1.c().al(), var7.get(var70), var17, var18);
                              break;
                           }
                        }
                     } else {
                        var74 = a(var1, var7.get(var70));
                     }
                  } else if (var19) {
                     var17 = var70 < var9.size() ? ((zfo)var9.get(var70)).c() : "";
                     var18 = var70 < var9.size() ? ((zfo)var9.get(var70)).b() : false;
                     if (var5.av()) {
                        var74 = zpv.a(var1.c().al(), com.aspose.cells.b.a.ze.g(var7.get(var70)) * Math.pow(10.0D, var1.Q().f()), var15, var16);
                     } else {
                        var74 = zpv.a(var1.c().al(), var7.get(var70), var17, var18);
                     }
                  } else {
                     var74 = a(var1, var7.get(var70));
                  }

                  var72 = zbsp.c(var0, var74, var13.a());
                  if (var72 > var67) {
                     var67 = var72;
                  }
               }

               label984:
               while(true) {
                  while(true) {
                     var50 = 0;
                     var25 = 0;
                     var26 = 0;
                     var27 = 0;
                     if (var5.av()) {
                        com.aspose.cells.b.a.b.zt var71 = zbsp.d(var0, "3", var13.a());
                        if (var4) {
                           var20.b((float)var2.f() / (float)var7.size());
                           var20.a((float)var2.e() * var28);
                           var20.b(var20.c() + (float)zbuk.a((double)var71.c()));
                        } else {
                           var20.a((float)var2.e() / (float)var7.size());
                           var20.b((float)var2.f() * var28);
                           var20.a(var20.b() + (float)zbuk.a((double)var71.b()));
                        }
                     } else if (var4) {
                        var20.b((float)var2.f() / (float)var49 * (float)var1.H());
                        var20.a((float)var2.e() * var28);
                        if (var1.I()) {
                           if (Math.abs(var13.d()) == 0 && var1.H() < var49) {
                              if (var20.c() < (float)var33.c()) {
                                 var1.k(var1.H() + var23);
                                 continue;
                              }
                           } else if (Math.abs(var13.d()) == 90 && var20.c() < (float)var33.b() && var1.H() < var49) {
                              var1.k(var1.H() + var23);
                              continue;
                           }
                        }
                     } else {
                        if (var22 > var1.H()) {
                           var20.a((float)var2.e() / (float)var49 * (float)var22);
                        } else {
                           var20.a((float)var2.e() / (float)var49 * (float)var1.H());
                        }

                        var20.b((float)var2.f() * var28);
                        if (var1.I()) {
                           if (Math.abs(var13.d()) == 0) {
                              if (var20.b() < (float)var33.b()) {
                                 var1.k(var1.H() + 1);
                                 continue;
                              }
                           } else if (Math.abs(var13.d()) == 90 && var20.b() < (float)var33.c()) {
                              var1.k(var1.H() + var23);
                              continue;
                           }
                        }

                        if (Math.abs(var13.d()) == 0 && (!var1.I() || var1.I() && var32) && var20.b() < var67) {
                           var20.a(var67);
                        }
                     }

                     for(var70 = 0; var70 < var7.size(); var70 += var1.H()) {
                        if (var70 == 0 && var34 <= 0) {
                           var1.F().d(zbuk.c((double)((float)(var33.b() * var1.F().c()) / var14)));
                        }

                        if (var34 > 0 && var61[var70] != null) {
                           var74 = var61[var70];
                        } else {
                           var74 = "";
                           if (var6) {
                              if (var19 && var11) {
                                 var74 = a(var1, var7.get(var70));
                                 var79 = var9.iterator();

                                 while(var79.hasNext()) {
                                    var75 = (zfo)var79.next();
                                    if (zhz.a(var75.a(), var48.S()) == com.aspose.cells.b.a.ze.f(var7.get(var70))) {
                                       var17 = var75.c();
                                       var18 = var75.b();
                                       var74 = zpv.a(var1.c().al(), var7.get(var70), var17, var18);
                                       break;
                                    }
                                 }
                              } else {
                                 var74 = a(var1, var7.get(var70));
                              }
                           } else if (var19) {
                              var17 = var70 < var9.size() ? ((zfo)var9.get(var70)).c() : "";
                              var18 = var70 < var9.size() ? ((zfo)var9.get(var70)).b() : false;
                              if (var5.av()) {
                                 var74 = zpv.a(var1.c().al(), com.aspose.cells.b.a.ze.g(var7.get(var70)) * Math.pow(10.0D, var1.Q().f()), var15, var16);
                              } else {
                                 var74 = zpv.a(var1.c().al(), var7.get(var70), var17, var18);
                              }
                           } else {
                              var74 = a(var1, var7.get(var70));
                           }

                           var61[var70] = var74;
                        }

                        com.aspose.cells.b.a.b.zs var81 = zbsp.a(var0, var74, var13.d(), var13.a(), (com.aspose.cells.b.a.b.zt)var20, 1, 1);
                        if (var81.b() > var50) {
                           var50 = var81.b();
                        }

                        if (var81.c() > var25) {
                           var25 = var81.c();
                        }

                        if (var70 == 0) {
                           if (var4) {
                              var26 = var81.c() / 2;
                           } else {
                              var26 = var81.b() / 2;
                           }
                        }

                        if (var70 == var7.size() - 1) {
                           if (var4) {
                              var27 = var81.c() / 2;
                           } else {
                              var27 = var81.b() / 2;
                           }
                        }
                     }

                     ++var34;
                     var1.h = (float)var25;
                     var1.i = (float)var50;
                     if (var4) {
                        if ((double)(var20.c() / (float)var25) > 2.5D && (double)var28 > 0.3D) {
                           var28 = var28 * 4.0F / 5.0F;
                           continue;
                        }
                     } else if (var20.b() / (float)var50 > 2.0F && (double)var28 > 0.3D) {
                        var28 = var28 * 4.0F / 5.0F;
                        continue;
                     }

                     if (!var1.I() || var32) {
                        break label984;
                     }

                     if (var4) {
                        if ((var50 != var29 || var25 != var30) && (float)var25 > var20.c() - 5.0F && var1.H() < var49) {
                           var29 = var50;
                           var30 = var25;
                           var31 = var20.c();
                           var1.k(var1.H() + var23);
                        } else {
                           if (var1.H() <= 1) {
                              break label984;
                           }

                           var1.k(var1.H() - var23);
                           if (var1.H() < 1) {
                              var1.k(1);
                           }

                           var32 = true;
                        }
                     } else if ((var50 != var29 || var25 != var30) && (float)var50 > var20.b() - 5.0F && var1.H() < var49) {
                        var29 = var50;
                        var30 = var25;
                        var31 = var20.b();
                        var1.k(var1.H() + var23);
                     } else {
                        if (var1.H() <= 1) {
                           break label984;
                        }

                        var1.k(var1.H() - var23);
                        if (var1.H() < 1) {
                           var1.k(1);
                        }

                        var32 = true;
                     }
                  }
               }

               if (var1.p()) {
                  var70 = var26;
                  var26 = var27;
                  var27 = var70;
               }
            }
         }

         if (var10 != null && var10.length > 0 && var9.size() > 0) {
            var1.k(1);
            byte var52 = 0;
            if (var4) {
               var52 = 90;
            }

            for(var29 = 0; var29 < var10.length; ++var29) {
               ArrayList var77 = var10[var29];
               if (var4) {
                  var20.b((float)(var2.f() / var77.size()));
                  var20.a((float)var2.e() * 0.5F);
               } else {
                  var20.a((float)(var2.e() / var77.size()));
                  var20.b((float)var2.f() * 0.5F);
               }

               com.aspose.cells.b.a.b.zs var69 = a(var0, var77, var52, var13, var20);
               if (var4) {
                  var50 += var69.b();
               } else {
                  var25 += var69.c();
               }
            }
         }

         var1.f = (float)var50;
         var1.g = (float)var25;
         if (a(var1, var5)) {
            if (var4) {
               var1.j = (float)var25 / 2.0F;
            } else {
               var1.j = (float)var50 / 2.0F;
            }

            var1.k = var1.j;
         } else if (b(var1, var5)) {
            var1.j = (float)var26;
            var1.k = (float)var27;
         }

         return new com.aspose.cells.b.a.b.zs(var50, var25);
      } else {
         return new com.aspose.cells.b.a.b.zs(0, 0);
      }
   }

   private static int b(zbo var0) {
      zif var1 = var0.c();
      boolean var4 = false;
      ArrayList var2;
      ArrayList[] var3;
      if (var0.d() == 0) {
         var2 = var1.z().c();
         var3 = var1.z().e();
         var4 = var1.z().b;
      } else {
         var2 = var1.z().d();
         var3 = var1.z().g();
         var4 = var1.z().c;
      }

      if (!var4) {
         return 1;
      } else if (var2.size() == 1) {
         return 1;
      } else {
         boolean var5 = true;
         int var6 = Integer.MAX_VALUE;
         float var7 = 0.0F;
         float var8 = 0.0F;
         boolean var9 = true;

         for(int var10 = 0; var10 < var2.size(); ++var10) {
            zfo var11 = (zfo)var2.get(var10);
            if (var11.a() != null && !var11.a().equals("")) {
               if (var9) {
                  if (var10 == 0) {
                     var7 = 100.0F;
                  }

                  if (var7 <= 0.0F) {
                     return 1;
                  }

                  var9 = false;
               } else {
                  if (var10 == var2.size()) {
                     var8 = 100.0F;
                  }

                  var8 = var7 < var8 / 2.0F ? var7 : var8 / 2.0F;
                  var7 = var8;
                  int var12 = zbuk.c((double)(var8 + 1.0F + var8));
                  if (var12 <= 1) {
                     return 1;
                  }

                  if (var12 < var6) {
                     var6 = var12;
                  }
               }
            } else if (var9) {
               ++var7;
            } else {
               ++var8;
            }
         }

         return var6 == Integer.MAX_VALUE ? 1 : var6;
      }
   }

   static boolean a(zbo var0, zbcp var1) {
      if (var0.q() && var0.E() != 3) {
         if (var0.d() != 1 && var0.d() != 3 && var1.ag() != 60 && var1.ag() != 12) {
            return !var0.f() && var0.F().d() == 0 && var1.ag() != 57 && var1.ag() != 59;
         } else {
            return true;
         }
      } else {
         return false;
      }
   }

   static boolean b(zbo var0, zbcp var1) {
      if (var0.q() && var0.E() != 3) {
         if (a(var0, var1)) {
            return false;
         } else {
            return (var0.d() == 0 || var0.d() == 2) && var0.f() && var1.ag() != 57 && var1.ag() != 59 && Math.abs(var0.F().d()) != 90 && var0.F().d() != 0;
         }
      } else {
         return false;
      }
   }

   private static com.aspose.cells.b.a.b.zs a(zn var0, List var1, int var2, zbtj var3, com.aspose.cells.b.a.b.zt var4) {
      var4.a(var4.b() + 4.0F);
      int var5 = 0;
      int var6 = 0;

      for(int var7 = 0; var7 < var1.size(); ++var7) {
         zfo var8 = (zfo)var1.get(var7);
         String var9 = zpv.a(var3.f().c().al(), var8.a(), var8.c(), var8.b());
         com.aspose.cells.b.a.b.zs var10 = zbsp.a(var0, var9, var2, var3.a(), (com.aspose.cells.b.a.b.zt)var4, 1, 1);
         if (var10.b() > var5) {
            var5 = var10.b();
         }

         if (var10.c() > var6) {
            var6 = var10.c();
         }
      }

      return new com.aspose.cells.b.a.b.zs(var5, var6);
   }

   static void b(zn var0, zbo var1, zbcp var2, boolean var3) {
      if (var1.E() != 3) {
         zjd var4 = var2.D().b(0);
         int var5 = var2.ag();
         zbtj var6 = var1.F();
         String var7 = var4.z();
         boolean var8 = var4.A();
         boolean var9 = false;
         if (var6.h() && var4 != null) {
            var9 = true;
         }

         int var10 = 0;
         int var11 = 0;

         int var12;
         for(var12 = 0; var12 < var1.l.size(); ++var12) {
            if (var12 == 0 || var12 == var1.l.size() - 1) {
               String var13 = "";
               double var14 = (Double)var1.l.get(var12) * Math.pow(10.0D, var1.Q().f());
               if (var9) {
                  if (zhz.b(var5)) {
                     var7 = "0%";
                  }

                  var13 = zpv.a(var1.c().al(), var14, var7, var8);
               } else {
                  var13 = a((zbo)var1, (Object)var14);
               }

               com.aspose.cells.b.a.b.zs var16 = zbsp.a(var1.c().ap(), var13, var6.d(), var6.a(), (com.aspose.cells.b.a.b.zt)(new com.aspose.cells.b.a.b.zt((float)var1.c().B().b.e(), (float)var1.c().B().b.f())), 1, 1);
               if (var12 == 0) {
                  if (var3) {
                     var10 = var16.b() / 2;
                  } else {
                     var10 = var16.c() / 2;
                  }
               }

               if (var12 == var1.l.size() - 1) {
                  if (var3) {
                     var11 = var16.b() / 2;
                  } else {
                     var11 = var16.c() / 2;
                  }
               }
            }
         }

         if (var1.p()) {
            var12 = var10;
            var10 = var11;
            var11 = var12;
         }

         var1.j = (float)var10;
         var1.k = (float)var11;
      }
   }

   static DateTime a(double var0, boolean var2) {
      return zbuk.a(var0, var2);
   }

   static int a(DateTime var0, boolean var1) {
      return (int)zbuk.a(var0, var1);
   }

   static String a(zbo var0, Object var1) {
      String var2 = var0.F().b();
      boolean var3 = var0.F().i();
      String var4 = "";
      if ((var0.d() == 0 || var0.d() == 2) && var0.k() == 2) {
         DateTime var5 = a((double)com.aspose.cells.b.a.zo.a(com.aspose.cells.b.a.zr.a(var1)), var0.c().S());
         if (!"".equals(var2)) {
            try {
               var5.b(var2);
            } catch (Exception var7) {
               if (var0.j() == 1) {
                  var2 = "M/d/yyyy";
               } else if (var0.j() == 2) {
                  var2 = "MMM-yy";
               } else {
                  var2 = "yyyy";
               }
            }
         } else if (var0.j() == 1) {
            var2 = "M/d/yyyy";
         } else if (var0.j() == 2) {
            var2 = "MMM-yy";
         } else {
            var2 = "yyyy";
         }

         if (com.aspose.cells.b.a.ze.f(var1) == 60) {
            var4 = zgc.a(var0.c().al(), var1, var2);
            if (var2.indexOf("d") >= 0 && var4.indexOf("28") >= 0) {
               var4 = com.aspose.cells.b.a.zv.a(var4, "28", "29");
            }
         } else {
            var4 = zgc.a(var0.c().al(), var5, var2);
         }
      } else {
         var4 = zpv.a(var0.c().al(), var1, var2, var3);
      }

      return var4;
   }

   static int a(int var0, int var1, int var2, boolean var3) {
      DateTime var5 = a((double)var1, var3);
      DateTime var6 = a((double)var2, var3);
      int var4;
      if (var0 == 1) {
         var4 = var1 - var2;
      } else if (var0 == 2) {
         var4 = (var5.getYear() - var6.getYear()) * 12 + var5.getMonth() - var6.getMonth();
      } else {
         var4 = var5.getYear() - var6.getYear();
      }

      return var4;
   }

   static int b(int var0, int var1, int var2, boolean var3) {
      DateTime var5 = a((double)var1, var3);
      DateTime var6 = a((double)var2, var3);
      int var4;
      if (var0 == 1) {
         var4 = var1 - var2;
      } else if (var0 == 2) {
         var4 = (var5.getYear() - var6.getYear()) * 12 + var5.getMonth() - var6.getMonth();
         if (var5.getDay() - var6.getDay() > 0) {
            ++var4;
         }
      } else {
         var4 = var5.getYear() - var6.getYear();
         if (var5.getMonth() - var6.getMonth() > 0 || var5.getDay() - var6.getDay() > 0) {
            ++var4;
         }
      }

      return var4;
   }

   static int a(int var0, int var1, int var2, int var3, boolean var4) {
      DateTime var5 = a((double)var3, var4);
      DateTime var6;
      if (var0 == 1) {
         if (var1 == 1) {
            var6 = var5.addDays((double)var2);
         } else if (var1 == 2) {
            var6 = var5.addMonths(var2);
         } else {
            var6 = var5.addYears(var2);
         }
      } else if (var0 == 2) {
         if (var1 == 2) {
            var6 = var5.addMonths(var2);
         } else {
            var6 = var5.addYears(var2);
         }
      } else {
         var6 = var5.addYears(var2);
      }

      return a(var6, var4);
   }

   static int a(int var0, int var1, boolean var2) {
      if (var0 == 1) {
         return var1;
      } else {
         DateTime var3;
         DateTime var4;
         if (var0 == 2) {
            var3 = a((double)var1, var2);
            var4 = new DateTime(var3.getYear(), var3.getMonth(), 1);
            return a(var4, var2);
         } else {
            var3 = a((double)var1, var2);
            var4 = new DateTime(var3.getYear(), 1, 1);
            return a(var4, var2);
         }
      }
   }

   static int a(zfo var0) {
      int var1 = 0;
      if (var0.d() != null && var0.d().getCount() != 0) {
         for(int var2 = 0; var2 < var0.d().getCount(); ++var2) {
            zfo var3 = (zfo)var0.d().a(var2);
            var1 += a(var3);
         }

         return var1;
      } else {
         return 1;
      }
   }

   private static void a(zn var0, ArrayList[] var1, float var2, float var3, float var4, boolean var5, zbo var6, double var7, zbtj var9, int var10, float var11, com.aspose.cells.b.a.b.zp var12, boolean var13) {
      byte var14 = 0;
      float var15 = var3;

      for(int var16 = 0; var16 < var1.length; ++var16) {
         ArrayList var17 = var1[var16];
         com.aspose.cells.b.a.b.zt var18 = new com.aspose.cells.b.a.b.zt(0.0F, 0.0F);
         if (var13) {
            var18.b((float)(var12.f() / var17.size()));
            var18.a((float)var12.e() * 0.5F);
         } else {
            var18.a((float)(var12.e() / var17.size()));
            var18.b((float)var12.f() * 0.5F);
         }

         com.aspose.cells.b.a.b.zs var19 = a(var0, var17, var14, var9, var18);
         float var20 = var2;

         for(int var21 = 0; var21 < var17.size(); ++var21) {
            zfo var22 = (zfo)var17.get(var21);
            String var23 = zpv.a(var6.c().al(), var22.a(), var22.c(), var22.b());
            int var24 = a(var22);
            float var25 = (float)((double)var24 * var7);
            float var26;
            if (!var6.p()) {
               var26 = var20 + var25 / 2.0F - (float)(var19.b() / 2);
            } else {
               var26 = var20 - var25 / 2.0F - (float)(var19.b() / 2);
            }

            float var27 = var5 ? var15 : var15 - (float)var19.c();
            com.aspose.cells.b.a.b.zq var28 = new com.aspose.cells.b.a.b.zq(var26, var27, (float)var19.b(), (float)var19.c());
            a(var0, com.aspose.cells.b.a.b.zp.a(var28), var23, var14, var9.a(), var9.g(), 1, var10);
            zama.a(var0, var20, var11, var20, var15, var6.g());
            if (var6.w() != 2) {
               float var29 = var5 ? var15 + var4 + (float)var19.c() : var15 - (var4 + (float)var19.c());
               a(var0, var22.d(), var20, var11, var29, var5, var6, var7);
            }

            if (!var6.p()) {
               var20 += var25;
            } else {
               var20 -= var25;
            }
         }

         zama.a(var0, var20, var11, var20, var15, var6.g());
         if (var5) {
            var15 += var4 + (float)var19.c();
         } else {
            var15 -= var4 + (float)var19.c();
         }
      }

   }

   private static void a(zn var0, zafs var1, float var2, float var3, float var4, boolean var5, zbo var6, double var7) {
      float var9 = var2;

      for(int var10 = 0; var10 < var1.getCount(); ++var10) {
         zfo var11 = (zfo)var1.a(var10);
         int var12 = a(var11);
         float var13 = (float)((double)var12 * var7);
         if (!var6.p()) {
            var9 += var13;
         } else {
            var9 -= var13;
         }

         zama.a(var0, var9, var3, var9, var4, var6.g());
      }

   }

   static zbo a(zbo var0) {
      zbo var1 = null;
      if (var0.d() == 0) {
         var1 = var0.c().E();
      } else if (var0.d() == 2) {
         var1 = var0.c().G();
      } else if (var0.d() == 1) {
         var1 = var0.c().e();
      } else if (var0.d() == 3) {
         var1 = var0.c().g();
      }

      return var1;
   }

   public static void a(zn var0, com.aspose.cells.b.a.b.zp var1, String var2, int var3, com.aspose.cells.b.a.b.zg var4, Color var5, int var6, int var7) {
      a(var0, var1, var2, var3, var4, var5, var6, var7, (com.aspose.cells.b.a.b.zv)null);
   }

   public static void a(zn var0, com.aspose.cells.b.a.b.zp var1, String var2, int var3, com.aspose.cells.b.a.b.zg var4, Color var5, int var6, int var7, com.aspose.cells.b.a.b.zv var8) {
      com.aspose.cells.b.a.b.zv var9;
      if (var8 == null) {
         var9 = new com.aspose.cells.b.a.b.zv();
      } else {
         var9 = new com.aspose.cells.b.a.b.zv(var8);
      }

      var9.a(zbsp.a(var6));
      var9.c(zbsp.a(var7));
      switch(Math.abs(var3)) {
      case 0:
         var0.a(var2, var4, new com.aspose.cells.b.a.b.zu(var5), (com.aspose.cells.b.a.b.zp)var1, var9);
         break;
      case 90:
         var0.b((float)(var1.g() + var1.e() / 2), (float)(var1.h() + var1.f() / 2));
         var0.a((float)(-var3));
         var1 = new com.aspose.cells.b.a.b.zp(-var1.f() / 2, -var1.e() / 2, var1.f(), var1.e());
         var0.a(var2, var4, new com.aspose.cells.b.a.b.zu(var5), (com.aspose.cells.b.a.b.zp)var1, var9);
         var0.d();
         break;
      default:
         double var10 = Math.sqrt(Math.pow((double)var1.e(), 2.0D) + Math.pow((double)var1.f(), 2.0D));
         var9.b(4096);
         com.aspose.cells.b.a.b.zt var12 = var0.a(var2, var4, (int)var10, var9);
         var0.b((float)(var1.g() + var1.e() / 2), (float)(var1.h() + var1.f() / 2));
         var0.a((float)(-var3));
         com.aspose.cells.b.a.b.zq var13 = new com.aspose.cells.b.a.b.zq(-var12.b() / 2.0F, -var12.c() / 2.0F, var12.b(), var12.c());
         var0.a(var2, var4, new com.aspose.cells.b.a.b.zu(var5), (com.aspose.cells.b.a.b.zq)var13, var9);
         var0.d();
      }

   }

   static void a(zn var0, String var1, com.aspose.cells.b.a.b.zo var2, com.aspose.cells.b.a.b.zt var3, int var4, com.aspose.cells.b.a.b.zg var5, Color var6, int var7) {
      com.aspose.cells.b.a.b.zu var8 = new com.aspose.cells.b.a.b.zu(var6);

      try {
         com.aspose.cells.b.a.b.zv var9 = new com.aspose.cells.b.a.b.zv(com.aspose.cells.b.a.b.zv.c());
         var9.d(3);
         com.aspose.cells.b.a.b.zt var10 = var0.a(var1, var5, var2, new com.aspose.cells.b.a.b.zv(com.aspose.cells.b.a.b.zv.c()));
         double var11 = (double)Math.abs(var4) / 180.0D * 3.141592653589793D;
         float var13 = (float)((double)var10.b() * Math.cos(var11) + (double)var10.c() * Math.sin(var11));
         float var14 = 0.0F;
         if (var13 <= var3.b()) {
            var14 = var10.b();
         } else {
            var14 = (float)(((double)var3.b() - (double)var10.c() * Math.sin(var11)) / Math.cos(var11));
         }

         float var15 = (float)((double)var10.c() * Math.sin(var11)) / 2.0F;
         var0.b(var2.d(), var2.e());
         var0.a((float)(-var4));
         com.aspose.cells.b.a.b.zq var16 = com.aspose.cells.b.a.b.zq.c();
         if (var7 == 0) {
            if (var4 > 0) {
               var16 = new com.aspose.cells.b.a.b.zq(-var14, 0.0F, var14, var10.c());
               var9.a(2);
               var0.b(-var15, 0.0F);
            } else {
               var16 = new com.aspose.cells.b.a.b.zq(0.0F, 0.0F, var14, var10.c());
               var9.a(0);
               var0.b(var15, 0.0F);
            }

            var16.b(var16.g() - var10.c() / 2.0F);
         } else if (var7 == 3) {
            if (var4 < 0) {
               var16 = new com.aspose.cells.b.a.b.zq(-var14, 0.0F, var14, var10.c());
               var9.a(2);
               var0.b(-var15, 0.0F);
            } else {
               var16 = new com.aspose.cells.b.a.b.zq(0.0F, 0.0F, var14, var10.c());
               var9.a(0);
               var0.b(var15, 0.0F);
            }

            var16.b(var16.g() - var10.c() / 2.0F);
         } else if (var7 == 1) {
            var16 = new com.aspose.cells.b.a.b.zq(-var14, -var10.c() / 2.0F, var14, var10.c());
            var9.a(2);
            var0.b(-var15, 0.0F);
         } else {
            var16 = new com.aspose.cells.b.a.b.zq(0.0F, -var10.c() / 2.0F, var14, var10.c());
            var9.a(0);
            var0.b(var15, 0.0F);
         }

         var16.d(var16.i() + 3.0F);
         var0.a(var1, var5, var8, (com.aspose.cells.b.a.b.zq)var16, var9);
         var0.d();
      } finally {
         if (var8 != null) {
            var8.f();
         }

      }

   }

   static void a(zif var0) throws Exception {
      if (!var0.B().D()) {
         boolean var1 = false;
         if (var0.E().D() == var0.E().l()) {
            var1 = true;
         }

         if (var0.p() < 0) {
            if (var1) {
               var0.e().j(3);
               var0.I().j(3);
               var0.e().d(false);
               var0.I().d(false);
            } else if (var0.e().E() == 1) {
               var0.e().j(3);
               var0.I().j(3);
            }
         }

      }
   }

   static com.aspose.cells.b.a.b.zs b(zn var0, zbo var1, com.aspose.cells.b.a.b.zp var2, int var3, boolean var4, zbcp var5) throws Exception {
      ArrayList var6 = (ArrayList)var1.l.clone();
      zbtj var7 = var1.F();
      if (var1.q() && var1.E() != 3 && var6.size() != 0 && !zbuk.a(var2)) {
         zif var8 = var1.c();
         zbo var9 = var8.E();
         boolean var10 = false;
         if (var9.D() == var9.l()) {
            var10 = true;
         }

         if (var8.p() < 0 && (var8.p() >= 0 || var10 || var1.E() != 2)) {
            return new com.aspose.cells.b.a.b.zs(0, 0);
         } else {
            boolean var12 = true;
            com.aspose.cells.b.a.b.zo[] var11;
            if (var1.d() == 0) {
               var11 = zib.c(var8);
            } else {
               var11 = zib.d(var8);
               var12 = false;
            }

            boolean var13 = false;
            if (var12 && var1.k() == 2) {
               var13 = true;
               var1.f(false);
               var1.k(1);
            }

            boolean var14 = false;
            if (var11[0].e() == var11[1].e()) {
               var14 = true;
            }

            boolean var15 = false;
            int var46;
            if (var12) {
               boolean var16 = var1.f() || var8.u();
               if (var13) {
                  int var17 = (int)var8.e().z();
                  int var18 = (int)var8.e().D();
                  int var19 = var1.j();
                  if (var16) {
                     var46 = a(var19, var17, var18, var1.c().S()) + 1;
                  } else {
                     var46 = a(var19, var17, var18, var1.c().S());
                     if (var46 == 0) {
                        var46 = 1;
                     }
                  }
               } else if (var16) {
                  var46 = var3;
               } else {
                  var46 = var3 - 1;
                  if (var46 == 0) {
                     var46 = 1;
                  }
               }
            } else {
               var46 = var6.size();
            }

            float var47 = Math.abs((var11[1].d() - var11[0].d()) / (float)var46);
            float var48 = Math.abs((var11[1].e() - var11[0].e()) / (float)var46);
            if (var12 && var4) {
               var47 = 0.0F;
               var48 = var8.N().i() / (float)var46;
            }

            double var49 = var11[1].d() == var11[0].d() ? 1.5707963267948966D : Math.atan((double)Math.abs((var11[0].e() - var11[1].e()) / (var11[1].d() - var11[0].d())));
            int var20 = zbuk.c(var49 * 180.0D / 3.141592653589793D);
            boolean var21 = false;
            if (var20 <= a) {
               var21 = true;
            }

            if (var12) {
               if (var7.j() && (var14 || !var21)) {
                  var7.c(false);
                  var7.b(0);
               }
            } else if (var7.j() && !var21) {
               var7.c(false);
               var7.b(0);
            }

            int var22 = b(var1);
            ArrayList var23 = var8.z().c();
            ArrayList[] var24 = var8.z().e();
            boolean var25 = var8.z().b;
            boolean var26 = false;
            if (var12 && var24 != null && var24.length > 0 && var23.size() > 0) {
               var26 = true;
            }

            float var27 = zjl.a(var8, var4);
            String var28 = "";
            boolean var29 = false;
            boolean var30 = false;
            if (var12) {
               if (var7.h() && var23.size() > 0) {
                  var30 = true;
               }

               if (var24 != null && var24.length > 0 && var23.size() > 0) {
                  var30 = true;
               }
            }

            com.aspose.cells.b.a.b.zt var31 = new com.aspose.cells.b.a.b.zt(0.0F, 0.0F);
            int var32 = 0;
            int var33 = 0;
            int var34 = 0;
            int var35 = 0;
            float var36;
            com.aspose.cells.b.a.b.zs var37;
            float var38;
            int var39;
            String var40;
            Iterator var41;
            zfo var42;
            com.aspose.cells.b.a.b.zs var54;
            if (var7.j()) {
               var36 = 0.55F;
               var37 = zbsp.a(var0, "a", var7.a());
               var38 = a(var0, var1, var5);

               label670:
               while(true) {
                  while(true) {
                     var32 = 0;
                     var33 = 0;
                     var34 = 0;
                     var35 = 0;
                     if (var4) {
                        var31.b(var48 * (float)var1.H());
                        var31.a((float)var2.e() * var36);
                        if (var1.I()) {
                           if (Math.abs(var7.d()) == 0) {
                              if (var31.c() < (float)var37.c() && var1.H() < var6.size()) {
                                 var1.k(var1.H() + 1);
                                 continue;
                              }
                           } else if (Math.abs(var7.d()) == 90 && var31.c() < var38 && var1.H() < var6.size()) {
                              var1.k(var1.H() + 1);
                              continue;
                           }
                        }
                     } else {
                        if (var22 > var1.H()) {
                           if (var14) {
                              var31.a(var47 * (float)var22);
                              var31.b((float)var2.f() * var36);
                           } else if (var21) {
                              var31.a(var47 * (float)var22);
                              var31.b((float)var2.f() * var36);
                           } else {
                              var31.a((float)var2.e() * 0.5F);
                              var31.b(var48 * (float)var22);
                           }
                        } else if (var14) {
                           var31.a(var47 * (float)var1.H());
                           var31.b((float)var2.f() * var36);
                        } else if (var21) {
                           var31.a(var47 * (float)var1.H());
                           var31.b((float)var2.f() * var36);
                        } else {
                           var31.a((float)var2.e() * 0.5F);
                           var31.b(var48 * (float)var1.H());
                        }

                        if (var1.I()) {
                           if (Math.abs(var7.d()) == 0) {
                              if (var14) {
                                 if (var31.b() == 0.0F) {
                                    var1.k(var6.size());
                                    var31.a((float)var2.e() * 0.5F);
                                 } else if (var31.b() < var38 && var1.H() < var6.size()) {
                                    if (var12) {
                                       var1.k(var1.H() + 1);
                                    } else {
                                       var7.b(90);
                                       if (var31.b() < (float)var37.c()) {
                                          var1.k(var1.H() + 1);
                                       }
                                    }
                                    continue;
                                 }
                              } else if (var21) {
                                 if (var31.b() < var38 && var1.H() < var6.size()) {
                                    var7.b(90);
                                    if (var31.b() < (float)var37.c()) {
                                       var1.k(var1.H() + 1);
                                    }
                                    continue;
                                 }
                              } else if (var31.c() < (float)var37.c()) {
                                 var1.k(var1.H() + 1);
                                 continue;
                              }
                           } else if (Math.abs(var7.d()) == 90 && var31.b() < (float)var37.c() && var1.H() < var6.size()) {
                              var1.k(var1.H() + 1);
                              continue;
                           }
                        }
                     }

                     for(var39 = 0; var39 < var6.size(); ++var39) {
                        if (var39 == 0) {
                           var1.F().d(zbuk.a((double)((float)(var37.b() * var1.F().c()) / var27)));
                        }

                        var40 = "";
                        var40 = a(var1, var6.get(var39));
                        if (var12 && var30) {
                           if (var13 && var25) {
                              var41 = var23.iterator();

                              while(var41.hasNext()) {
                                 var42 = (zfo)var41.next();
                                 if (zhz.a(var42.a(), var8.S()) == com.aspose.cells.b.a.ze.f(var6.get(var39))) {
                                    var28 = var42.c();
                                    var29 = var42.b();
                                    var40 = zpv.a(var1.c().al(), var6.get(var39), var28, var29);
                                    break;
                                 }
                              }
                           } else {
                              var28 = var39 < var23.size() ? ((zfo)var23.get(var39)).c() : "";
                              var29 = var39 < var23.size() ? ((zfo)var23.get(var39)).b() : false;
                              var40 = zpv.a(var1.c().al(), var6.get(var39), var28, var29);
                           }
                        }

                        new com.aspose.cells.b.a.b.zs(0, 0);
                        if (var26 && var7.d() == 0 && !var4) {
                           var31.a(var31.b() + 1.0F);
                        }

                        var54 = zbsp.a(var0, var40, var7.d(), var7.a(), (com.aspose.cells.b.a.b.zt)var31, 1, 1);
                        if (var54.b() > var32) {
                           var32 = var54.b();
                        }

                        if (var54.c() > var33) {
                           var33 = var54.c();
                        }

                        if (var39 == 0) {
                           if (var4) {
                              var34 = var54.c() / 2;
                           } else {
                              var34 = var54.b() / 2;
                           }
                        }

                        if (var39 == var6.size() - 1) {
                           if (var4) {
                              var35 = var54.c() / 2;
                           } else {
                              var35 = var54.b() / 2;
                           }
                        }

                        if (var26 && var39 == 0 && var7.d() == 0 && !var4) {
                           break;
                        }
                     }

                     var1.h = (float)var33;
                     var1.i = (float)var32;
                     if (var4) {
                        if (var31.c() / (float)var33 <= 2.0F || (double)var36 <= 0.2D || var31.b() * 4.0F / 5.0F <= var38) {
                           break label670;
                        }

                        var36 = var36 * 4.0F / 5.0F;
                     } else {
                        if (var14) {
                           break label670;
                        }

                        if (var21) {
                           if (var31.b() / (float)var32 <= 2.0F || (double)var36 <= 0.2D) {
                              break label670;
                           }

                           var36 = var36 * 4.0F / 5.0F;
                        } else {
                           if (var31.c() / (float)var33 <= 2.0F || (double)var36 <= 0.2D) {
                              break label670;
                           }

                           var36 = var36 * 4.0F / 5.0F;
                        }
                     }
                  }
               }

               if (var1.p()) {
                  var39 = var34;
                  var34 = var35;
                  var35 = var39;
               }
            } else if (var7.d() != 0 && Math.abs(var7.d()) != 90) {
               var36 = 0.5F;
               float var50 = 0.0F;
               if (var4) {
                  var50 = var48;
               } else {
                  var50 = var47;
               }

               new com.aspose.cells.b.a.b.zs(0, 0);

               for(var39 = 0; var39 < var6.size(); ++var39) {
                  int var59 = var6.size() - 1 - var39;
                  if (var4) {
                     if (var1.p()) {
                        if (var7.d() > 0) {
                           var31.a((float)var2.e() * var36);
                           var31.b(var8.N().i() - (float)var39 * var50 - var50 / 2.0F);
                        } else {
                           var31.a((float)var2.e() * var36);
                           var31.b(var8.N().i() - (float)var59 * var50 - var50 / 2.0F);
                        }
                     } else if (var7.d() > 0) {
                        var31.a((float)var2.e() * var36);
                        var31.b(var8.N().i() - (float)var59 * var50 - var50 / 2.0F);
                     } else {
                        var31.a((float)var2.e() * var36);
                        var31.b(var8.N().i() - (float)var39 * var50 - var50 / 2.0F);
                     }
                  } else if (var1.p()) {
                     if (var7.d() > 0) {
                        var31.a(var8.N().g() - (float)var39 * var50 - var50 / 2.0F);
                        var31.b((float)var2.f() * var36);
                     } else {
                        var31.a(var8.N().g() - (float)var59 * var50 - var50 / 2.0F);
                        var31.b((float)var2.f() * var36);
                     }
                  } else if (var7.d() > 0) {
                     var31.a(var8.N().g() - (float)var59 * var50 - var50 / 2.0F);
                     var31.b((float)var2.f() * var36);
                  } else {
                     var31.a(var8.N().g() - (float)var39 * var50 - var50 / 2.0F);
                     var31.b((float)var2.f() * var36);
                  }

                  if (var31.b() < (float)var2.e() * var36) {
                     var31.a((float)var2.e() * var36);
                  }

                  if (var31.c() < (float)var2.f() * var36) {
                     var31.b((float)var2.f() * var36);
                  }

                  if (var39 == 0) {
                     com.aspose.cells.b.a.b.zs var51 = zbsp.a(var0, "a", var7.a());
                     var1.F().d(zbuk.a((double)((float)(var51.b() * var1.F().c()) / var27)));
                  }

                  String var56 = "";
                  var56 = a(var1, var6.get(var39));
                  if (var12 && var30) {
                     if (var13 && var25) {
                        Iterator var57 = var23.iterator();

                        while(var57.hasNext()) {
                           zfo var43 = (zfo)var57.next();
                           if (zhz.a(var43.a(), var8.S()) == com.aspose.cells.b.a.ze.f(var6.get(var39))) {
                              var28 = var43.c();
                              var29 = var43.b();
                              var56 = zpv.a(var1.c().al(), var6.get(var39), var28, var29);
                              break;
                           }
                        }
                     } else {
                        var28 = var39 < var23.size() ? ((zfo)var23.get(var39)).c() : "";
                        var29 = var39 < var23.size() ? ((zfo)var23.get(var39)).b() : false;
                        var56 = zpv.a(var1.c().al(), var6.get(var39), var28, var29);
                     }
                  }

                  com.aspose.cells.b.a.b.zs var58 = zbsp.a(var0, var56, var7.d(), var7.a(), (com.aspose.cells.b.a.b.zt)var31, 1, 1);
                  if (var58.b() > var32) {
                     var32 = var58.b();
                  }

                  if (var58.c() > var33) {
                     var33 = var58.c();
                  }

                  int var60 = var32;
                  if (var4) {
                     var60 = var33;
                  }

                  float var44;
                  float var45;
                  switch(var1.a()) {
                  case 0:
                     if (var1.p()) {
                        if (var7.d() > 0) {
                           var44 = (float)var59 * var50 + var50 / 2.0F;
                           if ((float)var60 > var44) {
                              var45 = (float)var60 - var44;
                              if (var45 > (float)var34) {
                                 var34 = (int)var45;
                              }
                           }
                        } else {
                           var44 = (float)var39 * var50 + var50 / 2.0F;
                           if ((float)var60 > var44) {
                              var45 = (float)var60 - var44;
                              if (var45 > (float)var35) {
                                 var35 = (int)var45;
                              }
                           }
                        }
                     } else if (var7.d() > 0) {
                        var44 = (float)var39 * var50 + var50 / 2.0F;
                        if ((float)var60 > var44) {
                           var45 = (float)var60 - var44;
                           if (var45 > (float)var34) {
                              var34 = (int)var45;
                           }
                        }
                     } else {
                        var44 = (float)var59 * var50 + var50 / 2.0F;
                        if ((float)var60 > var44) {
                           var45 = (float)var60 - var44;
                           if (var45 > (float)var35) {
                              var35 = (int)var45;
                           }
                        }
                     }
                     break;
                  case 1:
                     if (var1.p()) {
                        if (var7.d() > 0) {
                           var44 = (float)var59 * var50 + var50 / 2.0F;
                           if ((float)var60 > var44) {
                              var45 = (float)var60 - var44;
                              if (var45 > (float)var34) {
                                 var34 = (int)var45;
                              }
                           }
                        } else {
                           var44 = (float)var39 * var50 + var50 / 2.0F;
                           if ((float)var60 > var44) {
                              var45 = (float)var60 - var44;
                              if (var45 > (float)var35) {
                                 var35 = (int)var45;
                              }
                           }
                        }
                     } else if (var7.d() > 0) {
                        var44 = (float)var39 * var50 + var50 / 2.0F;
                        if ((float)var60 > var44) {
                           var45 = (float)var60 - var44;
                           if (var45 > (float)var34) {
                              var34 = (int)var45;
                           }
                        }
                     } else {
                        var44 = (float)var59 * var50 + var50 / 2.0F;
                        if ((float)var60 > var44) {
                           var45 = (float)var60 - var44;
                           if (var45 > (float)var35) {
                              var35 = (int)var45;
                           }
                        }
                     }
                     break;
                  case 2:
                     if (var1.p()) {
                        if (var7.d() < 0) {
                           var44 = (float)var59 * var50 + var50 / 2.0F;
                           if ((float)var60 > var44) {
                              var45 = (float)var60 - var44;
                              if (var45 > (float)var34) {
                                 var34 = (int)var45;
                              }
                           }
                        } else {
                           var44 = (float)var39 * var50 + var50 / 2.0F;
                           if ((float)var60 > var44) {
                              var45 = (float)var60 - var44;
                              if (var45 > (float)var35) {
                                 var35 = (int)var45;
                              }
                           }
                        }
                     } else if (var7.d() < 0) {
                        var44 = (float)var39 * var50 + var50 / 2.0F;
                        if ((float)var60 > var44) {
                           var45 = (float)var60 - var44;
                           if (var45 > (float)var34) {
                              var34 = (int)var45;
                           }
                        }
                     } else {
                        var44 = (float)var59 * var50 + var50 / 2.0F;
                        if ((float)var60 > var44) {
                           var45 = (float)var60 - var44;
                           if (var45 > (float)var35) {
                              var35 = (int)var45;
                           }
                        }
                     }
                     break;
                  case 3:
                     if (var1.p()) {
                        if (var7.d() < 0) {
                           var44 = (float)var59 * var50 + var50 / 2.0F;
                           if ((float)var60 > var44) {
                              var45 = (float)var60 - var44;
                              if (var45 > (float)var34) {
                                 var34 = (int)var45;
                              }
                           }
                        } else {
                           var44 = (float)var39 * var50 + var50 / 2.0F;
                           if ((float)var60 > var44) {
                              var45 = (float)var60 - var44;
                              if (var45 > (float)var35) {
                                 var35 = (int)var45;
                              }
                           }
                        }
                     } else if (var7.d() < 0) {
                        var44 = (float)var39 * var50 + var50 / 2.0F;
                        if ((float)var60 > var44) {
                           var45 = (float)var60 - var44;
                           if (var45 > (float)var34) {
                              var34 = (int)var45;
                           }
                        }
                     } else {
                        var44 = (float)var59 * var50 + var50 / 2.0F;
                        if ((float)var60 > var44) {
                           var45 = (float)var60 - var44;
                           if (var45 > (float)var35) {
                              var35 = (int)var45;
                           }
                        }
                     }
                  }
               }

               var1.i = (float)var32;
               var1.h = (float)var33;
            } else {
               var36 = 0.55F;
               var37 = zbsp.a(var0, "a", var7.a());
               var38 = a(var0, var1, var5);

               label745:
               while(true) {
                  while(true) {
                     var32 = 0;
                     var33 = 0;
                     var34 = 0;
                     var35 = 0;
                     if (var4) {
                        var31.b(var48 * (float)var1.H());
                        var31.a((float)var2.e() * var36);
                        if (var1.I()) {
                           if (Math.abs(var7.d()) == 0) {
                              if (var31.c() < (float)var37.c() && var1.H() < var6.size()) {
                                 var1.k(var1.H() + 1);
                                 continue;
                              }
                           } else if (Math.abs(var7.d()) == 90 && var31.c() < var38 && var1.H() < var6.size()) {
                              var1.k(var1.H() + 1);
                              continue;
                           }
                        }
                     } else {
                        if (var22 > var1.H()) {
                           if (var14) {
                              var31.a(var47 * (float)var22);
                              var31.b((float)var2.f() * var36);
                           } else if (var21) {
                              var31.a(var47 * (float)var22);
                              var31.b((float)var2.f() * var36);
                           } else {
                              var31.a((float)var2.e() * 0.5F);
                              var31.b(var48 * (float)var22);
                           }
                        } else if (var14) {
                           var31.a(var47 * (float)var1.H());
                           var31.b((float)var2.f() * var36);
                        } else if (var21) {
                           var31.a(var47 * (float)var1.H());
                           var31.b((float)var2.f() * var36);
                        } else {
                           var31.a((float)var2.e() * 0.5F);
                           var31.b(var48 * (float)var1.H());
                        }

                        if (var1.I()) {
                           if (Math.abs(var7.d()) == 0) {
                              if (var14) {
                                 if (var31.b() == 0.0F) {
                                    var1.k(var6.size());
                                    var31.a((float)var2.e() * 0.5F);
                                 } else if (var31.b() < var38 && var1.H() < var6.size()) {
                                    var1.k(var1.H() + 1);
                                    continue;
                                 }
                              } else if (var21) {
                                 if (var31.b() < var38 && var1.H() < var6.size()) {
                                    var1.k(var1.H() + 1);
                                    continue;
                                 }
                              } else if (var31.c() < (float)var37.c() && var1.H() < var6.size()) {
                                 var1.k(var1.H() + 1);
                                 continue;
                              }
                           } else if (Math.abs(var7.d()) == 90) {
                              if (var14) {
                                 if (var31.b() < (float)var37.c() && var1.H() < var6.size()) {
                                    var1.k(var1.H() + 1);
                                    continue;
                                 }
                              } else if (var21) {
                                 if (var31.b() < (float)var37.c() && var1.H() < var6.size()) {
                                    var1.k(var1.H() + 1);
                                    continue;
                                 }
                              } else if (var31.b() < (float)var37.c() && var1.H() < var6.size()) {
                                 var1.k(var1.H() + 1);
                                 continue;
                              }
                           }
                        }
                     }

                     for(var39 = 0; var39 < var6.size(); ++var39) {
                        if (var39 == 0) {
                           var1.F().d(zbuk.a((double)((float)(var37.b() * var1.F().c()) / var27)));
                        }

                        var40 = "";
                        var40 = a(var1, var6.get(var39));
                        if (var12 && var30) {
                           if (var13 && var25) {
                              var41 = var23.iterator();

                              while(var41.hasNext()) {
                                 var42 = (zfo)var41.next();
                                 if (zhz.a(var42.a(), var8.S()) == com.aspose.cells.b.a.ze.f(var6.get(var39))) {
                                    var28 = var42.c();
                                    var29 = var42.b();
                                    var40 = zpv.a(var1.c().al(), var6.get(var39), var28, var29);
                                    break;
                                 }
                              }
                           } else {
                              var28 = var39 < var23.size() ? ((zfo)var23.get(var39)).c() : "";
                              var29 = var39 < var23.size() ? ((zfo)var23.get(var39)).b() : false;
                              var40 = zpv.a(var1.c().al(), var6.get(var39), var28, var29);
                           }
                        }

                        new com.aspose.cells.b.a.b.zs(0, 0);
                        if (var26 && var7.d() == 0 && !var4) {
                           var31.a(var31.b() + 1.0F);
                        }

                        var54 = zbsp.a(var0, var40, var7.d(), var7.a(), (com.aspose.cells.b.a.b.zt)var31, 1, 1);
                        if (var54.b() > var32) {
                           var32 = var54.b();
                        }

                        if (var54.c() > var33) {
                           var33 = var54.c();
                        }

                        if (var39 == 0) {
                           if (var4) {
                              var34 = var54.c() / 2;
                           } else {
                              var34 = var54.b() / 2;
                           }
                        }

                        if (var39 == var6.size() - 1) {
                           if (var4) {
                              var35 = var54.c() / 2;
                           } else {
                              var35 = var54.b() / 2;
                           }
                        }
                     }

                     var1.h = (float)var33;
                     var1.i = (float)var32;
                     if (var4) {
                        if (var31.c() / (float)var33 <= 2.0F || (double)var36 <= 0.2D || var31.b() * 4.0F / 5.0F <= var38) {
                           break label745;
                        }

                        var36 = var36 * 4.0F / 5.0F;
                     } else {
                        if (var14) {
                           break label745;
                        }

                        if (var21) {
                           if (var31.b() / (float)var32 <= 2.0F || (double)var36 <= 0.2D) {
                              break label745;
                           }

                           var36 = var36 * 4.0F / 5.0F;
                        } else {
                           if (var31.c() / (float)var33 <= 2.0F || (double)var36 <= 0.2D) {
                              break label745;
                           }

                           var36 = var36 * 4.0F / 5.0F;
                        }
                     }
                  }
               }

               if (var1.p()) {
                  var39 = var34;
                  var34 = var35;
                  var35 = var39;
               }
            }

            if (var12 && var24 != null && var24.length > 0 && var23.size() > 0) {
               var1.k(1);
               byte var52 = 0;
               if (var4) {
                  var52 = 90;
               }

               for(int var61 = 0; var61 < var24.length; ++var61) {
                  ArrayList var53 = var24[var61];
                  if (var4) {
                     var31.b((float)(var2.f() / var53.size()));
                     var31.a((float)var2.e() * 0.5F);
                  } else {
                     var31.a((float)(var2.e() / var53.size()));
                     var31.b((float)var2.f() * 0.5F);
                  }

                  com.aspose.cells.b.a.b.zs var55 = a(var0, var53, var52, var7, var31);
                  if (var4) {
                     var32 += var55.b();
                  } else {
                     var33 += var55.c();
                  }
               }
            }

            var1.f = (float)var32;
            var1.g = (float)var33;
            if (a(var1, var5)) {
               if (var4) {
                  var1.j = (float)var33 / 2.0F;
               } else {
                  var1.j = (float)var32 / 2.0F;
               }

               var1.k = var1.j;
            } else if (b(var1, var5)) {
               var1.j = (float)var34;
               var1.k = (float)var35;
            }

            return new com.aspose.cells.b.a.b.zs(var32, var33);
         }
      } else {
         return new com.aspose.cells.b.a.b.zs(0, 0);
      }
   }

   private static float a(zn var0, zbo var1, zbcp var2) {
      zif var3 = var1.c();
      ArrayList var4 = var1.l;
      zbtj var5 = var1.F();
      String var6 = "";
      boolean var7 = false;
      boolean var8 = false;
      ArrayList var9 = var3.z().c();
      ArrayList[] var10 = var3.z().e();
      if (var5.h() && var9.size() > 0) {
         var8 = true;
      }

      if (var10 != null && var10.length > 0 && var9.size() > 0) {
         var8 = true;
      }

      float var11 = 0.0F;

      for(int var12 = 0; var12 < var4.size(); ++var12) {
         String var13 = "";
         if (var1.d() == 0) {
            if (var8) {
               var6 = var12 < var9.size() ? ((zfo)var9.get(var12)).c() : "";
               var7 = var12 < var9.size() ? ((zfo)var9.get(var12)).b() : false;
               var13 = zpv.a(var1.c().al(), var4.get(var12), var6, var7);
            } else {
               var13 = a(var1, var4.get(var12));
            }
         } else {
            var13 = a(var1, var4.get(var12));
         }

         float var14 = zbsp.c(var0, var13, var5.a());
         if (var14 > var11) {
            var11 = var14;
         }
      }

      return var11;
   }

   static com.aspose.cells.b.a.b.zp a(zn var0, zbo var1, int var2, boolean var3) {
      ArrayList var4 = (ArrayList)var1.l.clone();
      zif var5 = var1.c();
      zbvc var6 = var5.N();
      boolean var8 = true;
      com.aspose.cells.b.a.b.zo[] var7;
      if (var1.d() == 0) {
         var7 = zib.c(var5);
      } else {
         var7 = zib.d(var5);
         var8 = false;
      }

      boolean var9 = false;
      if (var8 && var1.k() == 2) {
         var9 = true;
         var1.f(false);
         var1.k(1);
      }

      zbo var10 = var5.E();
      double var11 = var10.S();
      double var13 = var10.T();
      double var15 = var10.U();
      boolean var17 = false;
      if (var10.D() == var10.l()) {
         var17 = true;
      }

      if (var10.p()) {
         var15 = var11 - var15;
      } else {
         var15 -= var13;
      }

      int var18 = (int)(var15 / (var11 - var13) * (double)var5.N().i());
      if (var1.E() == 2) {
         var7[0].b(var7[0].e() - (float)var18);
         var7[1].b(var7[1].e() - (float)var18);
      }

      zbcr var19 = var5.z();
      zbtj var20 = var1.F();
      ArrayList var21 = var5.z().c();
      ArrayList[] var22 = var5.z().e();
      float var23 = (float)var1.F().k();
      boolean var24 = var1.f() || var5.u();
      boolean var25 = false;
      int var37;
      if (var8) {
         if (var9) {
            int var26 = (int)var5.e().z();
            int var27 = (int)var5.e().D();
            int var28 = var1.j();
            if (var24) {
               var37 = a(var28, var26, var27, var1.c().S()) + 1;
            } else {
               var37 = a(var28, var26, var27, var1.c().S());
               if (var37 == 0) {
                  var37 = 1;
               }
            }
         } else if (var24) {
            var37 = var2;
         } else {
            var37 = var2 - 1;
            if (var37 == 0) {
               var37 = 1;
            }
         }
      } else {
         var37 = var4.size();
      }

      float var38 = (var7[1].d() - var7[0].d()) / (float)var37;
      float var39 = (var7[1].e() - var7[0].e()) / (float)var37;
      if (var8 && var3) {
         var38 = 0.0F;
         var39 = var5.N().i() / (float)var37;
      }

      double var40 = var7[1].d() == var7[0].d() ? 1.5707963267948966D : Math.atan((double)Math.abs((var7[0].e() - var7[1].e()) / (var7[1].d() - var7[0].d())));
      int var30 = zbuk.c(var40 * 180.0D / 3.141592653589793D);
      boolean var31 = false;
      if (var30 <= a) {
         var31 = true;
      }

      ArrayList var32 = new ArrayList();

      int var34;
      com.aspose.cells.b.a.b.zq var35;
      for(int var33 = 0; var33 < var4.size(); ++var33) {
         var34 = var33;
         if (var1.p()) {
            var34 = var4.size() - 1 - var33;
         }

         if (var1.E() != 3 && var34 % var1.H() == 0) {
            var35 = com.aspose.cells.b.a.b.zq.c();
            float var36;
            if (var5.p() >= 0) {
               if (var7[0].e() == var7[1].e()) {
                  var35.a(var7[0].d() + (float)var33 * var38 + var38 / 2.0F - var1.f / 2.0F);
                  var35.b(var7[0].e() + var23);
                  if (!var24) {
                     var35.a(var35.f() - var38 / 2.0F);
                  }

                  var35.c(var1.f);
                  var35.d(var1.g);
               } else {
                  if (var31) {
                     var35.a(var7[0].d() + (float)var33 * var38 + var38 / 2.0F - var1.f / 2.0F);
                     var35.b(var7[0].e() + (float)var33 * var39 + var39 / 2.0F);
                     var35.b(var35.g() + var23);
                     var35.c(var1.f);
                     var35.d(var1.g);
                  } else {
                     var36 = (float)((double)(var1.g / 2.0F) / Math.tan(var40) + (double)var23 / Math.sin(var40));
                     if (var38 > 0.0F && var39 > 0.0F) {
                        var35.a(var7[0].d() + (float)var33 * var38 + var38 / 2.0F - var36 - var1.f);
                     } else if (var38 < 0.0F && var39 > 0.0F) {
                        var35.a(var7[0].d() + (float)var33 * var38 + var38 / 2.0F + var36);
                     } else if (var38 < 0.0F && var39 < 0.0F) {
                        var35.a(var7[0].d() + (float)var33 * var38 + var38 / 2.0F - var36 - var1.f);
                     } else {
                        var35.a(var7[0].d() + (float)var33 * var38 + var38 / 2.0F + var36);
                     }

                     var35.b(var7[0].e() + (float)var33 * var39 + var39 / 2.0F - var1.g / 2.0F);
                     var35.c(var1.f);
                     var35.d(var1.g);
                  }

                  if (!var24) {
                     var35.a(var35.f() - var38 / 2.0F);
                     var35.b(var35.g() - var39 / 2.0F);
                  }
               }
            } else if (var5.p() < 0 && !var17 && var1.E() == 2) {
               if (var7[0].e() == var7[1].e()) {
                  var35.a(var7[0].d() + (float)var33 * var38 + var38 / 2.0F - var1.f / 2.0F);
                  var35.b(var7[0].e() - var1.g - var23);
                  if (!var24) {
                     var35.a(var35.f() - var38 / 2.0F);
                  }

                  var35.c(var1.f);
                  var35.d(var1.g);
               } else {
                  if (var31) {
                     var35.a(var7[0].d() + (float)var33 * var38 + var38 / 2.0F - var1.f / 2.0F);
                     var35.b(var7[0].e() + (float)var33 * var39 + var39 / 2.0F);
                     var35.b(var35.g() - var23);
                     var35.b(var35.g() - var1.g);
                     var35.c(var1.f);
                     var35.d(var1.g);
                  } else {
                     var36 = (float)((double)(var1.g / 2.0F) / Math.tan(var40) + (double)var23 / Math.sin(var40));
                     if (var38 > 0.0F && var39 < 0.0F) {
                        var35.a(var7[0].d() + (float)var33 * var38 + var38 / 2.0F - var36 - var1.f);
                     } else if (var38 < 0.0F && var39 < 0.0F) {
                        var35.a(var7[0].d() + (float)var33 * var38 + var38 / 2.0F + var36);
                     } else if (var38 < 0.0F && var39 > 0.0F) {
                        var35.a(var7[0].d() + (float)var33 * var38 + var38 / 2.0F - var36 - var1.f);
                     } else {
                        var35.a(var7[0].d() + (float)var33 * var38 + var38 / 2.0F + var36);
                     }

                     var35.b(var7[0].e() + (float)var33 * var39 + var39 / 2.0F - var1.g / 2.0F);
                     var35.c(var1.f);
                     var35.d(var1.g);
                  }

                  if (!var24) {
                     var35.a(var35.f() - var38 / 2.0F);
                     var35.b(var35.g() - var39 / 2.0F);
                  }
               }
            }

            if (!var35.n() && var35.h() > 0.0F && var35.i() > 0.0F) {
               com.aspose.cells.b.a.a.ze.a(var32, (Object)var35);
            }
         }
      }

      com.aspose.cells.b.a.b.zp var41 = com.aspose.cells.b.a.b.zp.a();

      for(var34 = 0; var34 < var32.size(); ++var34) {
         var35 = (com.aspose.cells.b.a.b.zq)var32.get(var34);
         if (var41.k()) {
            var41 = new com.aspose.cells.b.a.b.zp((int)var35.f(), (int)var35.g(), (int)var35.h(), (int)var35.i());
         } else {
            if (var35.f() < (float)var41.c()) {
               var41.c(var41.e() + (int)((float)var41.c() - var35.f()));
               var41.a((int)var35.f());
            }

            if (var35.g() < (float)var41.d()) {
               var41.d(var41.f() + (int)((float)var41.d() - var35.g()));
               var41.b((int)var35.g());
            }

            if (var35.l() > (float)var41.i()) {
               var41.c(var41.e() + (int)(var35.l() - (float)var41.i()));
            }

            if (var35.m() > (float)var41.j()) {
               var41.d(var41.f() + (int)(var35.m() - (float)var41.j()));
            }
         }
      }

      return var41;
   }

   static void a(zn var0, zbo var1) throws Exception {
      if (!var1.c().B().D()) {
         zif var2 = var1.c();
         int var3 = var2.M();
         zbvc var4 = var2.N();
         com.aspose.cells.b.a.b.zo var5 = zib.e(var2);
         zama.a(var0, var5.d(), var5.e(), var5.d(), var5.e() - var4.i(), var1.g());
         zbtj var6 = var1.F();
         zbcp var7 = var2.z().c(0);
         zjd var8 = var7.D().b(0);
         String var9 = var8.z();
         boolean var10 = var8.A();
         boolean var11 = false;
         if (var6.h() && var8 != null) {
            var11 = true;
         }

         float var12 = 0.0F;
         byte var13 = 8;
         if (var5.d() > var2.N().j()) {
            var13 = 7;
            var12 = var5.d();
            var12 += (float)var1.X();
            var12 += (float)var1.Z();
         } else {
            var12 = var5.d() - var1.f;
            var12 -= (float)var1.X();
            var12 -= (float)var1.Z();
         }

         ArrayList var14 = var1.l;
         double var15 = var1.n() ? zbuk.e(var1.z()) : var1.z();
         double var17 = var1.n() ? zbuk.e(var1.D()) : var1.D();
         double var19 = var1.n() ? zbuk.e(var1.x()) : var1.x();

         for(int var21 = 0; var21 < var1.l.size(); ++var21) {
            double var22 = (Double)var1.l.get(var21);
            double var24 = var1.n() ? zbuk.f(var22) : var22;
            if (var21 - 1 > 0) {
               if (Math.abs(zbuk.a(var19, Math.abs(zbuk.a(var22, com.aspose.cells.b.a.ze.g(var14.get(var21 - 1)))))) / var19 > b) {
                  continue;
               }
            } else if (var21 + 1 < var14.size() && Math.abs(zbuk.a(var19, Math.abs(zbuk.a(var22, com.aspose.cells.b.a.ze.g(var14.get(var21 + 1)))))) / var19 > b) {
               continue;
            }

            float var26 = (float)((var22 - var17) / (var15 - var17) * (double)var2.N().i());
            if (!var1.p()) {
               var26 = var5.e() - var26;
            } else {
               var26 += var5.e() - var4.i();
            }

            if (var1.E() != 3) {
               if (zhz.b(var3)) {
                  var24 /= 100.0D;
                  var9 = "0%";
               }

               String var27 = "";
               var24 = var1.n() ? var24 : var24 * Math.pow(10.0D, var1.Q().f());
               Color var28 = var6.g();
               if (var11) {
                  var27 = zpv.a(var1.c().al(), var24, var9, var10);
                  var28 = zpv.a(var24, var9, var28);
               } else {
                  var27 = a((zbo)var1, (Object)var24);
                  var28 = zpv.a(var24, var6.b(), var28);
               }

               com.aspose.cells.b.a.b.zq var29 = new com.aspose.cells.b.a.b.zq(var12, var26 - var1.g / 2.0F, var1.f, var1.g);
               a(var0, com.aspose.cells.b.a.b.zp.a(var29), var27, var6.d(), var6.a(), var28, var13, 1, com.aspose.cells.b.a.b.zv.c());
            }

            a(var0, var1, var5.d(), var26);
         }

         a(var0, var1, var5.d(), var5.e() - var4.i(), var5.e());
      }
   }

   private static void a(zn var0, zbo var1, float var2, float var3) {
      if (var1.w() != 2 && var1.g().e()) {
         zif var4 = var1.c();
         zbvc var5 = var4.N();
         boolean var6 = false;
         boolean var7 = false;
         switch(var1.w()) {
         case 0:
            var6 = true;
            var7 = true;
            break;
         case 1:
            var6 = true;
            if (var2 > var4.N().j()) {
               var6 = false;
               var7 = true;
            }
         case 2:
         default:
            break;
         case 3:
            var7 = true;
            if (var2 > var4.N().j()) {
               var7 = false;
               var6 = true;
            }
         }

         if (var6) {
            zama.a(var0, var2, var3, var2 + (float)var1.X(), var3, var1.g());
         }

         if (var7) {
            zama.a(var0, var2 - (float)var1.X(), var3, var2, var3, var1.g());
         }

      }
   }

   private static void a(zn var0, zbo var1, float var2, float var3, float var4) {
      if (var1.A() != 2 && var1.g().e()) {
         zif var5 = var1.c();
         zbvc var6 = var5.N();
         boolean var7 = false;
         boolean var8 = false;
         switch(var1.A()) {
         case 0:
            var7 = true;
            var8 = true;
            break;
         case 1:
            var7 = true;
            if (var2 > var5.N().j()) {
               var7 = false;
               var8 = true;
            }
         case 2:
         default:
            break;
         case 3:
            var8 = true;
            if (var2 > var5.N().j()) {
               var8 = false;
               var7 = true;
            }
         }

         float var10 = (float)(var1.B() / (var1.z() - var1.D()) * (double)(var4 - var3));
         float var9;
         if (!var1.p()) {
            var9 = var4;
            var10 = -var10;
         } else {
            var9 = var3;
         }

         float var11 = var9;

         do {
            if (var7) {
               zama.a(var0, var2, var11, var2 + (float)var1.Y(), var11, var1.g());
            }

            if (var8) {
               zama.a(var0, var2 - (float)var1.Y(), var11, var2, var11, var1.g());
            }

            var11 += var10;
         } while(var3 <= var11 && var11 <= var4);

      }
   }

   static void a(zn var0, zbo var1, int var2, com.aspose.cells.b.a.b.zp var3, boolean var4) throws Exception {
      if (!zbuk.a(var3)) {
         if (var1.k() == 2) {
            d(var0, var1);
         } else {
            zif var5 = var1.c();
            zbvc var6 = var5.N();
            com.aspose.cells.b.a.b.zo[] var7 = zib.c(var5);
            zbo var8 = var5.E();
            double var9 = var8.S();
            double var11 = var8.T();
            double var13 = var8.U();
            boolean var15 = false;
            if (var8.D() == var8.l()) {
               var15 = true;
            }

            if (var8.p()) {
               var13 = var9 - var13;
            } else {
               var13 -= var11;
            }

            int var16 = (int)(var13 / (var9 - var11) * (double)var5.N().i());
            if (var16 != 0) {
               zama.a(var0, var7[0].d(), var7[0].e() - (float)var16, var7[1].d(), var7[1].e() - (float)var16, var1.g());
            }

            if (var5.p() >= 0) {
               zama.a(var0, var7[0].d(), var7[0].e(), var7[1].d(), var7[1].e(), var1.g());
            }

            if (var1.E() == 2) {
               var7[0].b(var7[0].e() - (float)var16);
               var7[1].b(var7[1].e() - (float)var16);
            }

            zbcr var17 = var5.z();
            zbtj var18 = var1.F();
            ArrayList var19 = var5.z().c();
            ArrayList[] var20 = var5.z().e();
            float var21 = (float)var1.F().k();
            boolean var22 = var1.f() || var5.u();
            int var23;
            if (var22) {
               var23 = var2;
            } else {
               var23 = var2 - 1;
               if (var23 == 0) {
                  var23 = 1;
               }
            }

            double var24 = var7[1].d() == var7[0].d() ? 1.5707963267948966D : Math.atan((double)Math.abs((var7[0].e() - var7[1].e()) / (var7[1].d() - var7[0].d())));
            int var26 = zbuk.c(var24 * 180.0D / 3.141592653589793D);
            boolean var27 = false;
            if (var26 <= a) {
               var27 = true;
            }

            float var28 = (var7[1].d() - var7[0].d()) / (float)var23;
            float var29 = (var7[1].e() - var7[0].e()) / (float)var23;
            boolean var30 = true;
            boolean var31 = true;

            String var36;
            byte var43;
            for(int var32 = 0; var32 < var2; ++var32) {
               int var33 = var32;
               if (var1.p()) {
                  var33 = var2 - 1 - var32;
               }

               String var34 = "";
               Color var35 = var18.g();
               if (var33 < var1.l.size()) {
                  var34 = a(var1, var1.l.get(var33));
                  var35 = zpv.a(var1.l.get(var33), var18.b(), var35);
                  if (var18.h() && var19.size() > 0) {
                     var36 = "";
                     boolean var37 = false;
                     var36 = var33 < var19.size() ? ((zfo)var19.get(var33)).c() : "";
                     var37 = var33 < var19.size() ? ((zfo)var19.get(var33)).b() : false;
                     var34 = zpv.a(var1.c().al(), var1.l.get(var33), var36, var37);
                     var35 = zpv.a(var1.l.get(var33), var36, var35);
                  }
               }

               if (var1.E() != 3 && var33 % var1.H() == 0) {
                  com.aspose.cells.b.a.b.zq var48 = com.aspose.cells.b.a.b.zq.c();
                  byte var42 = 1;
                  var43 = 1;
                  float var49;
                  if (var5.p() >= 0) {
                     if (var7[0].e() == var7[1].e()) {
                        var48.a(var7[0].d() + (float)var32 * var28 + var28 / 2.0F - var1.i / 2.0F);
                        var48.b(var7[0].e() + var21);
                        var43 = 9;
                        if (!var22) {
                           var48.a(var48.f() - var28 / 2.0F);
                        }

                        var48.c(var1.i);
                        var48.d(var1.h);
                     } else {
                        if (var27) {
                           var48.a(var7[0].d() + (float)var32 * var28 + var28 / 2.0F - var1.i / 2.0F);
                           var48.b(var7[0].e() + (float)var32 * var29 + var29 / 2.0F);
                           var48.b(var48.g() + var21);
                           var43 = 9;
                           var48.c(var1.i);
                           var48.d(var1.h);
                        } else {
                           var49 = (float)((double)(var1.h / 2.0F) / Math.tan(var24) + (double)var21 / Math.sin(var24));
                           if (var28 > 0.0F && var29 > 0.0F) {
                              var48.a(var7[0].d() + (float)var32 * var28 + var28 / 2.0F - var49 - var1.i);
                              var42 = 8;
                           } else if (var28 < 0.0F && var29 > 0.0F) {
                              var48.a(var7[0].d() + (float)var32 * var28 + var28 / 2.0F + var49);
                              var42 = 7;
                           } else if (var28 < 0.0F && var29 < 0.0F) {
                              var48.a(var7[0].d() + (float)var32 * var28 + var28 / 2.0F - var49 - var1.i);
                              var42 = 8;
                           } else {
                              var48.a(var7[0].d() + (float)var32 * var28 + var28 / 2.0F + var49);
                              var42 = 7;
                           }

                           var48.b(var7[0].e() + (float)var32 * var29 + var29 / 2.0F - var1.h / 2.0F);
                           var48.c(var1.i);
                           var48.d(var1.h);
                        }

                        if (!var22) {
                           var48.a(var48.f() - var28 / 2.0F);
                           var48.b(var48.g() - var29 / 2.0F);
                        }
                     }
                  } else if (var5.p() < 0 && !var15 && var1.E() == 2) {
                     if (var7[0].e() == var7[1].e()) {
                        var48.a(var7[0].d() + (float)var32 * var28 + var28 / 2.0F - var1.i / 2.0F);
                        var48.b(var7[0].e() - var1.h - var21);
                        if (!var22) {
                           var48.a(var48.f() - var28 / 2.0F);
                        }

                        var48.c(var1.i);
                        var48.d(var1.h);
                     } else {
                        if (var27) {
                           var48.a(var7[0].d() + (float)var32 * var28 + var28 / 2.0F - var1.i / 2.0F);
                           var48.b(var7[0].e() + (float)var32 * var29 + var29 / 2.0F);
                           var48.b(var48.g() - var21);
                           var48.b(var48.g() - var1.h);
                           var43 = 0;
                           var48.c(var1.i);
                           var48.d(var1.h);
                        } else {
                           var49 = (float)((double)(var1.h / 2.0F) / Math.tan(var24) + (double)var21 / Math.sin(var24));
                           if (var28 > 0.0F && var29 < 0.0F) {
                              var48.a(var7[0].d() + (float)var32 * var28 + var28 / 2.0F - var49 - var1.i);
                              var42 = 8;
                           } else if (var28 < 0.0F && var29 < 0.0F) {
                              var48.a(var7[0].d() + (float)var32 * var28 + var28 / 2.0F + var49);
                              var42 = 7;
                           } else if (var28 < 0.0F && var29 > 0.0F) {
                              var48.a(var7[0].d() + (float)var32 * var28 + var28 / 2.0F - var49 - var1.i);
                              var42 = 8;
                           } else {
                              var48.a(var7[0].d() + (float)var32 * var28 + var28 / 2.0F + var49);
                              var42 = 7;
                           }

                           var48.b(var7[0].e() + (float)var32 * var29 + var29 / 2.0F - var1.h / 2.0F);
                           var48.c(var1.i);
                           var48.d(var1.h);
                        }

                        if (!var22) {
                           var48.a(var48.f() - var28 / 2.0F);
                           var48.b(var48.g() - var29 / 2.0F);
                        }
                     }
                  }

                  if (!var48.n() && var48.h() > 0.0F && var48.i() > 0.0F) {
                     a(var0, com.aspose.cells.b.a.b.zp.a(var48), var34, var18.d(), var18.a(), var35, var42, var43);
                  }
               }
            }

            a(var0, var1, var16, var2);
            boolean var44 = var5.E().p();
            float var45 = var7[0].e();
            var43 = 9;
            if (var20 != null && var20.length > 0 && var19.size() > 0 && var1.E() != 3) {
               ArrayList var46 = var20[0];
               zfo var47 = (zfo)var46.get(0);
               var36 = zpv.a(var1.c().al(), var47.a(), var47.c(), var47.b());
               zbsp.a(var1.c().ap(), var36, 0, var18.a(), (com.aspose.cells.b.a.b.zt)(new com.aspose.cells.b.a.b.zt((float)var3.e(), (float)var3.f())), 1, 1);
               float var38;
               if (!var1.p()) {
                  var38 = var7[0].d();
               } else {
                  var38 = var7[1].d();
               }

               float var39 = var45 + var21 * (float)(var20.length + 1) + var1.g;
               boolean var41 = false;
               if (var7[0].e() == var7[1].e()) {
                  a(var0, var20, var38, var39, var21, var41, var1, (double)var28, var18, var43, var45, var3, var4);
               }
            }

         }
      }
   }

   private static void d(zn var0, zbo var1) throws Exception {
      zif var2 = var1.c();
      zbvc var3 = var2.N();
      com.aspose.cells.b.a.b.zo[] var4 = zib.c(var2);
      boolean var5 = false;
      if (var2.E().D() == var2.E().l()) {
         var5 = true;
      }

      double var6;
      if (var2.E().p()) {
         var6 = var2.E().z() - var2.E().l();
      } else {
         var6 = var2.E().l() - var2.E().D();
      }

      int var8 = (int)(var6 / (var2.E().z() - var2.E().D()) * (double)var2.N().i());
      if (var8 != 0) {
         zama.a(var0, var4[0].d(), var4[0].e() - (float)var8, var4[1].d(), var4[1].e() - (float)var8, var1.g());
      }

      if (var2.p() >= 0) {
         zama.a(var0, var4[0].d(), var4[0].e(), var4[1].d(), var4[1].e(), var1.g());
      }

      if (var1.E() == 2) {
         var4[0].b(var4[0].e() - (float)var8);
         var4[1].b(var4[1].e() - (float)var8);
      }

      zbcr var9 = var2.z();
      zbtj var10 = var1.F();
      ArrayList var11 = var2.z().c();
      float var12 = (float)var1.F().k();
      double var13 = var4[1].d() == var4[0].d() ? 1.5707963267948966D : Math.atan((double)Math.abs((var4[0].e() - var4[1].e()) / (var4[1].d() - var4[0].d())));
      int var15 = zbuk.c(180.0D * var13 / 3.141592653589793D);
      boolean var16 = false;
      if (var15 <= a) {
         var16 = true;
      }

      int var17 = (int)var1.z();
      int var18 = (int)var1.D();
      int var19 = var1.j();
      boolean var20 = var1.f() || var2.u();
      int var21;
      if (var20) {
         var21 = a(var19, var17, var18, var1.c().S()) + 1;
      } else {
         var21 = a(var19, var17, var18, var1.c().S());
         if (var21 == 0) {
            var21 = 1;
         }
      }

      float var22 = (var4[1].d() - var4[0].d()) / (float)var21;
      float var23 = (var4[1].e() - var4[0].e()) / (float)var21;
      ArrayList var24 = var1.l;
      boolean var25 = true;
      boolean var26 = true;

      for(int var27 = 0; var27 < var24.size(); ++var27) {
         int var28 = var27;
         if (var1.p()) {
            var28 = var24.size() - 1 - var27;
         }

         Object var29 = var1.l.get(var28);
         String var30 = "";
         Color var31 = var10.g();
         var30 = a(var1, var29);
         var31 = zpv.a(var29, var10.b(), var31);
         if (var10.h() && var2.z().b) {
            String var32 = "";
            boolean var33 = false;
            Iterator var34 = var11.iterator();

            while(var34.hasNext()) {
               zfo var35 = (zfo)var34.next();
               if (zhz.a(var35.a(), var2.S()) == com.aspose.cells.b.a.ze.f(var29)) {
                  var32 = var35.c();
                  var33 = var35.b();
                  var30 = zpv.a(var1.c().al(), var29, var32, var33);
                  var31 = zpv.a(var29, var32, var31);
                  break;
               }
            }
         }

         if (var1.E() != 3) {
            com.aspose.cells.b.a.b.zq var38 = com.aspose.cells.b.a.b.zq.c();
            byte var36 = 1;
            byte var37 = 1;
            float var39;
            if (var2.p() >= 0) {
               if (var4[0].e() == var4[1].e()) {
                  var38.a(var4[0].d() + (float)var27 * var22 + var22 / 2.0F - var1.f / 2.0F);
                  var38.b(var4[0].e() + var12);
                  var37 = 9;
                  if (!var20) {
                     var38.a(var38.f() - var22 / 2.0F);
                  }

                  var38.c(var1.f);
                  var38.d(var1.g);
               } else {
                  if (var16) {
                     var38.a(var4[0].d() + (float)var27 * var22 + var22 / 2.0F - var1.f / 2.0F);
                     var38.b(var4[0].e() + (float)var27 * var23 + var23 / 2.0F);
                     var38.b(var38.g() + var12);
                     var37 = 9;
                     var38.c(var1.f);
                     var38.d(var1.g);
                  } else {
                     var39 = (float)((double)(var1.g / 2.0F) / Math.tan(var13) + (double)var12 / Math.sin(var13));
                     if (var22 > 0.0F && var23 > 0.0F) {
                        var38.a(var4[0].d() + (float)var27 * var22 + var22 / 2.0F - var39 - var1.f);
                        var36 = 8;
                     } else if (var22 < 0.0F && var23 > 0.0F) {
                        var38.a(var4[0].d() + (float)var27 * var22 + var22 / 2.0F + var39);
                        var36 = 7;
                     } else if (var22 < 0.0F && var23 < 0.0F) {
                        var38.a(var4[0].d() + (float)var27 * var22 + var22 / 2.0F - var39 - var1.f);
                        var36 = 8;
                     } else {
                        var38.a(var4[0].d() + (float)var27 * var22 + var22 / 2.0F + var39);
                        var36 = 7;
                     }

                     var38.b(var4[0].e() + (float)var27 * var23 + var23 / 2.0F - var1.g / 2.0F);
                     var38.c(var1.f);
                     var38.d(var1.g);
                  }

                  if (!var20) {
                     var38.a(var38.f() - var22 / 2.0F);
                     var38.b(var38.g() - var23 / 2.0F);
                  }
               }
            } else if (var2.p() < 0 && !var5 && var1.E() == 2) {
               if (var4[0].e() == var4[1].e()) {
                  var38.a(var4[0].d() + (float)var27 * var22 + var22 / 2.0F - var1.f / 2.0F);
                  var38.b(var4[0].e() - var1.g - var12);
                  if (!var20) {
                     var38.a(var38.f() - var22 / 2.0F);
                  }

                  var38.c(var1.f);
                  var38.d(var1.g);
               } else {
                  if (var16) {
                     var38.a(var4[0].d() + (float)var27 * var22 + var22 / 2.0F - var1.f / 2.0F);
                     var38.b(var4[0].e() + (float)var27 * var23 + var23 / 2.0F);
                     var38.b(var38.g() - var12);
                     var38.b(var38.g() - var1.g);
                     var37 = 0;
                     var38.c(var1.f);
                     var38.d(var1.g);
                  } else {
                     var39 = (float)((double)(var1.g / 2.0F) / Math.tan(var13) + (double)var12 / Math.sin(var13));
                     if (var22 > 0.0F && var23 < 0.0F) {
                        var38.a(var4[0].d() + (float)var27 * var22 + var22 / 2.0F - var39 - var1.f);
                        var36 = 8;
                     } else if (var22 < 0.0F && var23 < 0.0F) {
                        var38.a(var4[0].d() + (float)var27 * var22 + var22 / 2.0F + var39);
                        var36 = 7;
                     } else if (var22 < 0.0F && var23 > 0.0F) {
                        var38.a(var4[0].d() + (float)var27 * var22 + var22 / 2.0F - var39 - var1.f);
                        var36 = 8;
                     } else {
                        var38.a(var4[0].d() + (float)var27 * var22 + var22 / 2.0F + var39);
                        var36 = 7;
                     }

                     var38.b(var4[0].e() + (float)var27 * var23 + var23 / 2.0F - var1.g / 2.0F);
                     var38.c(var1.f);
                     var38.d(var1.g);
                  }

                  if (!var20) {
                     var38.a(var38.f() - var22 / 2.0F);
                     var38.b(var38.g() - var23 / 2.0F);
                  }
               }
            }

            if (!var38.n() && var38.h() > 0.0F && var38.i() > 0.0F) {
               a(var0, com.aspose.cells.b.a.b.zp.a(var38), var30, var10.d(), var10.a(), var31, var36, var37);
            }
         }
      }

      a(var0, var1, var8);
   }

   private static void a(zn var0, zbo var1, int var2, int var3) {
      zif var4 = var1.c();
      zbvc var5 = var4.N();
      if ((var1.w() != 2 || var1.A() != 2) && var1.g().e()) {
         boolean var6 = var1.f() || var1.c().u();
         com.aspose.cells.b.a.b.zo[] var7;
         if (var1.d() == 4) {
            var7 = zib.d(var4);
            var6 = true;
         } else {
            var7 = zib.c(var4);
         }

         double var8 = var7[1].d() == var7[0].d() ? 1.5707963267948966D : Math.atan((double)Math.abs((var7[0].e() - var7[1].e()) / (var7[1].d() - var7[0].d())));
         int var10 = zbuk.c(180.0D * var8 / 3.141592653589793D);
         boolean var11 = false;
         if (var10 <= a) {
            var11 = true;
         }

         int var16;
         if (var6) {
            var16 = var3;
         } else {
            var16 = var3 - 1;
            if (var16 == 0) {
               var16 = 1;
            }
         }

         if (var4.p() < 0 && var2 > 0) {
            var7[0].b(var7[0].e() - (float)var2);
            var7[1].b(var7[1].e() - (float)var2);
            var2 = 0;
         }

         while(true) {
            float var12;
            float var13;
            com.aspose.cells.b.a.b.zo var14;
            com.aspose.cells.b.a.b.zo var15;
            boolean var17;
            boolean var18;
            float var19;
            float var20;
            boolean var21;
            boolean var22;
            if (var11) {
               var17 = false;
               var18 = false;
               switch(var1.w()) {
               case 0:
                  var17 = true;
                  var18 = true;
                  break;
               case 1:
                  if (var4.p() >= 0) {
                     var17 = true;
                  } else {
                     var18 = true;
                  }
               case 2:
               default:
                  break;
               case 3:
                  if (var4.p() >= 0) {
                     var18 = true;
                  } else {
                     var17 = true;
                  }
               }

               if (!var1.p()) {
                  var14 = var7[0];
                  var15 = var7[1];
               } else {
                  var14 = var7[1];
                  var15 = var7[0];
               }

               var12 = (var15.d() - var14.d()) / (float)var16;
               var13 = (var15.e() - var14.e()) / (float)var16;
               if (var12 == 0.0F && var13 == 0.0F) {
                  return;
               }

               var19 = var14.d();
               var20 = var14.e();

               label254:
               while(true) {
                  if ((var14.d() > var19 || var19 > var15.d()) && (var14.d() < var19 || var19 < var15.d()) && com.aspose.cells.b.a.zq.a((double)var19) != com.aspose.cells.b.a.zq.a((double)var14.d()) && com.aspose.cells.b.a.zq.a((double)var19) != com.aspose.cells.b.a.zq.a((double)var15.d())) {
                     var21 = false;
                     var22 = false;
                     switch(var1.A()) {
                     case 0:
                        var21 = true;
                        var22 = true;
                        break;
                     case 1:
                        if (var4.p() >= 0) {
                           var21 = true;
                        } else {
                           var22 = true;
                        }
                     case 2:
                     default:
                        break;
                     case 3:
                        if (var4.p() >= 0) {
                           var22 = true;
                        } else {
                           var21 = true;
                        }
                     }

                     var19 = var14.d() + (float)var1.J() * var12 / 2.0F;
                     var20 = var14.e() + (float)var1.J() * var13 / 2.0F;

                     while(true) {
                        if ((var14.d() > var19 || var19 > var15.d()) && (var14.d() < var19 || var19 < var15.d()) && com.aspose.cells.b.a.zq.a((double)var19) != com.aspose.cells.b.a.zq.a((double)var14.d()) && com.aspose.cells.b.a.zq.a((double)var19) != com.aspose.cells.b.a.zq.a((double)var15.d())) {
                           break label254;
                        }

                        if (var21) {
                           zama.a(var0, var19, var20 - (float)var1.Y(), var19, var20, var1.g());
                        }

                        if (var22) {
                           zama.a(var0, var19, var20, var19, var20 + (float)var1.Y(), var1.g());
                        }

                        if (var1.w() == 2) {
                           var19 += (float)var1.J() * var12 / 2.0F;
                           var20 += (float)var1.J() * var13 / 2.0F;
                           if (var14.e() <= var20 && var20 <= var15.e() || var14.e() >= var20 && var20 >= var15.e() || com.aspose.cells.b.a.zq.a((double)var20) == com.aspose.cells.b.a.zq.a((double)var14.e()) || com.aspose.cells.b.a.zq.a((double)var20) == com.aspose.cells.b.a.zq.a((double)var15.e())) {
                              if (var21) {
                                 zama.a(var0, var19, var20 - (float)var1.Y(), var19, var20, var1.g());
                              }

                              if (var22) {
                                 zama.a(var0, var19, var20, var19, var20 + (float)var1.Y(), var1.g());
                              }
                           }

                           var19 -= (float)var1.J() * var12 / 2.0F;
                           var20 -= (float)var1.J() * var13 / 2.0F;
                        }

                        var19 += (float)var1.J() * var12;
                        var20 += (float)var1.J() * var13;
                     }
                  }

                  if (var17) {
                     zama.a(var0, var19, var20 - (float)var1.X(), var19, var20, var1.g());
                  }

                  if (var18) {
                     zama.a(var0, var19, var20, var19, var20 + (float)var1.X(), var1.g());
                  }

                  var19 += (float)var1.J() * var12;
                  var20 += (float)var1.J() * var13;
               }
            } else {
               var17 = false;
               var18 = false;
               switch(var1.w()) {
               case 0:
                  var17 = true;
                  var18 = true;
                  break;
               case 1:
                  if (var4.D() >= 90 && (var4.D() < 225 || var4.D() >= 270)) {
                     var18 = true;
                  } else {
                     var17 = true;
                  }
               case 2:
               default:
                  break;
               case 3:
                  if (var4.D() >= 90 && (var4.D() < 225 || var4.D() >= 270)) {
                     var17 = true;
                  } else {
                     var18 = true;
                  }
               }

               if (!var1.p()) {
                  var14 = var7[0];
                  var15 = var7[1];
               } else {
                  var14 = var7[1];
                  var15 = var7[0];
               }

               var12 = (var15.d() - var14.d()) / (float)var16;
               var13 = (var15.e() - var14.e()) / (float)var16;
               if (var12 == 0.0F && var13 == 0.0F) {
                  return;
               }

               var19 = var14.d();
               var20 = var14.e();

               label319:
               while(true) {
                  if ((var14.e() > var20 || var20 > var15.e()) && (var14.e() < var20 || var20 < var15.e()) && com.aspose.cells.b.a.zq.a((double)var20) != com.aspose.cells.b.a.zq.a((double)var14.e()) && com.aspose.cells.b.a.zq.a((double)var20) != com.aspose.cells.b.a.zq.a((double)var15.e())) {
                     var21 = false;
                     var22 = false;
                     switch(var1.A()) {
                     case 0:
                        var21 = true;
                        var22 = true;
                        break;
                     case 1:
                        if (var4.D() >= 90 && (var4.D() < 225 || var4.D() >= 270)) {
                           var22 = true;
                        } else {
                           var21 = true;
                        }
                     case 2:
                     default:
                        break;
                     case 3:
                        if (var4.D() >= 90 && (var4.D() < 225 || var4.D() >= 270)) {
                           var21 = true;
                        } else {
                           var22 = true;
                        }
                     }

                     var19 = var14.d() + (float)var1.J() * var12 / 2.0F;
                     var20 = var14.e() + (float)var1.J() * var13 / 2.0F;

                     while(true) {
                        if ((var14.e() > var20 || var20 > var15.e()) && (var14.e() < var20 || var20 < var15.e()) && com.aspose.cells.b.a.zq.a((double)var20) != com.aspose.cells.b.a.zq.a((double)var14.e()) && com.aspose.cells.b.a.zq.a((double)var20) != com.aspose.cells.b.a.zq.a((double)var15.e())) {
                           break label319;
                        }

                        if (var21) {
                           zama.a(var0, var19, var20, var19 + (float)var1.Y(), var20, var1.g());
                        }

                        if (var22) {
                           zama.a(var0, var19 - (float)var1.Y(), var20, var19, var20, var1.g());
                        }

                        if (var1.w() == 2) {
                           var19 += (float)var1.J() * var12 / 2.0F;
                           var20 += (float)var1.J() * var13 / 2.0F;
                           if (var14.e() <= var20 && var20 <= var15.e() || var14.e() >= var20 && var20 >= var15.e() || com.aspose.cells.b.a.zq.a((double)var20) == com.aspose.cells.b.a.zq.a((double)var14.e()) || com.aspose.cells.b.a.zq.a((double)var20) == com.aspose.cells.b.a.zq.a((double)var15.e())) {
                              if (var21) {
                                 zama.a(var0, var19, var20, var19 + (float)var1.Y(), var20, var1.g());
                              }

                              if (var22) {
                                 zama.a(var0, var19 - (float)var1.Y(), var20, var19, var20, var1.g());
                              }
                           }

                           var19 -= (float)var1.J() * var12 / 2.0F;
                           var20 -= (float)var1.J() * var13 / 2.0F;
                        }

                        var19 += (float)var1.J() * var12;
                        var20 += (float)var1.J() * var13;
                     }
                  }

                  if (var17) {
                     zama.a(var0, var19, var20, var19 + (float)var1.X(), var20, var1.g());
                  }

                  if (var18) {
                     zama.a(var0, var19 - (float)var1.X(), var20, var19, var20, var1.g());
                  }

                  var19 += (float)var1.J() * var12;
                  var20 += (float)var1.J() * var13;
               }
            }

            if (var2 <= 0) {
               return;
            }

            var7[0].b(var7[0].e() - (float)var2);
            var7[1].b(var7[1].e() - (float)var2);
            var2 = 0;
         }
      }
   }

   private static void a(zn var0, zbo var1, int var2) {
      zif var3 = var1.c();
      zbvc var4 = var3.N();
      if ((var1.w() != 2 || var1.A() != 2) && var1.g().e()) {
         com.aspose.cells.b.a.b.zo[] var5 = zib.c(var3);
         double var6 = var5[1].d() == var5[0].d() ? 1.5707963267948966D : Math.atan((double)Math.abs((var5[0].e() - var5[1].e()) / (var5[1].d() - var5[0].d())));
         int var8 = zbuk.c(180.0D * var6 / 3.141592653589793D);
         boolean var9 = false;
         if (var8 <= a) {
            var9 = true;
         }

         int var14 = (int)var1.z();
         int var15 = (int)var1.D();
         int var16 = var1.j();
         boolean var17 = var1.f() || var3.u();
         int var18;
         if (var17) {
            var18 = a(var16, var14, var15, var1.c().S()) + 1;
         } else {
            var18 = a(var16, var14, var15, var1.c().S());
            if (var18 == 0) {
               var18 = 1;
            }
         }

         if (var3.p() < 0 && var2 > 0) {
            var5[0].b(var5[0].e() - (float)var2);
            var5[1].b(var5[1].e() - (float)var2);
            var2 = 0;
         }

         while(true) {
            float var10;
            float var11;
            com.aspose.cells.b.a.b.zo var12;
            com.aspose.cells.b.a.b.zo var13;
            boolean var19;
            boolean var20;
            float var21;
            float var22;
            boolean var23;
            boolean var24;
            if (var9) {
               var19 = false;
               var20 = false;
               switch(var1.w()) {
               case 0:
                  var19 = true;
                  var20 = true;
                  break;
               case 1:
                  if (var3.p() >= 0) {
                     var19 = true;
                  } else {
                     var20 = true;
                  }
               case 2:
               default:
                  break;
               case 3:
                  if (var3.p() >= 0) {
                     var20 = true;
                  } else {
                     var19 = true;
                  }
               }

               if (!var1.p()) {
                  var12 = var5[0];
                  var13 = var5[1];
               } else {
                  var12 = var5[1];
                  var13 = var5[0];
               }

               var10 = (var13.d() - var12.d()) / (float)var18;
               var11 = (var13.e() - var12.e()) / (float)var18;
               var21 = var12.d();
               var22 = var12.e();

               label190:
               while(true) {
                  if ((var12.d() > var21 || var21 > var13.d()) && (var12.d() < var21 || var21 < var13.d()) && com.aspose.cells.b.a.zq.a((double)var21) != com.aspose.cells.b.a.zq.a((double)var12.d()) && com.aspose.cells.b.a.zq.a((double)var21) != com.aspose.cells.b.a.zq.a((double)var13.d())) {
                     var23 = false;
                     var24 = false;
                     switch(var1.A()) {
                     case 0:
                        var23 = true;
                        var24 = true;
                        break;
                     case 1:
                        if (var3.p() >= 0) {
                           var23 = true;
                        } else {
                           var24 = true;
                        }
                     case 2:
                     default:
                        break;
                     case 3:
                        if (var3.p() >= 0) {
                           var24 = true;
                        } else {
                           var23 = true;
                        }
                     }

                     var21 = var12.d();
                     var22 = var12.e();

                     while(true) {
                        if ((var12.d() > var21 || var21 > var13.d()) && (var12.d() < var21 || var21 < var13.d()) && com.aspose.cells.b.a.zq.a((double)var21) != com.aspose.cells.b.a.zq.a((double)var12.d()) && com.aspose.cells.b.a.zq.a((double)var21) != com.aspose.cells.b.a.zq.a((double)var13.d())) {
                           break label190;
                        }

                        if (var23) {
                           zama.a(var0, var21, var22 - (float)var1.Y(), var21, var22, var1.g());
                        }

                        if (var24) {
                           zama.a(var0, var21, var22, var21, var22 + (float)var1.Y(), var1.g());
                        }

                        var21 += var10 * (float)a(var16, a(var1.j(), var1.C(), (int)var1.B(), (int)var1.D(), var1.c().S()), (int)var1.D(), var1.c().S());
                        var22 += var11 * (float)a(var16, a(var1.j(), var1.C(), (int)var1.B(), (int)var1.D(), var1.c().S()), (int)var1.D(), var1.c().S());
                     }
                  }

                  if (var19) {
                     zama.a(var0, var21, var22 - (float)var1.X(), var21, var22, var1.g());
                  }

                  if (var20) {
                     zama.a(var0, var21, var22, var21, var22 + (float)var1.X(), var1.g());
                  }

                  var21 += var10 * (float)a(var16, a(var1.j(), var1.y(), (int)var1.x(), (int)var1.D(), var1.c().S()), (int)var1.D(), var1.c().S());
                  var22 += var11 * (float)a(var16, a(var1.j(), var1.y(), (int)var1.x(), (int)var1.D(), var1.c().S()), (int)var1.D(), var1.c().S());
               }
            } else {
               var19 = false;
               var20 = false;
               switch(var1.w()) {
               case 0:
                  var19 = true;
                  var20 = true;
                  break;
               case 1:
                  if (var3.D() >= 90 && (var3.D() < 225 || var3.D() >= 270)) {
                     var20 = true;
                  } else {
                     var19 = true;
                  }
               case 2:
               default:
                  break;
               case 3:
                  if (var3.D() >= 90 && (var3.D() < 225 || var3.D() >= 270)) {
                     var19 = true;
                  } else {
                     var20 = true;
                  }
               }

               if (!var1.p()) {
                  var12 = var5[0];
                  var13 = var5[1];
               } else {
                  var12 = var5[1];
                  var13 = var5[0];
               }

               var10 = (var13.d() - var12.d()) / (float)var18;
               var11 = (var13.e() - var12.e()) / (float)var18;
               var21 = var12.d();
               var22 = var12.e();

               label233:
               while(true) {
                  if ((var12.e() > var22 || var22 > var13.e()) && (var12.e() < var22 || var22 < var13.e()) && com.aspose.cells.b.a.zq.a((double)var22) != com.aspose.cells.b.a.zq.a((double)var12.e()) && com.aspose.cells.b.a.zq.a((double)var22) != com.aspose.cells.b.a.zq.a((double)var13.e())) {
                     var23 = false;
                     var24 = false;
                     switch(var1.A()) {
                     case 0:
                        var23 = true;
                        var24 = true;
                        break;
                     case 1:
                        if (var3.D() >= 90 && (var3.D() < 225 || var3.D() >= 270)) {
                           var24 = true;
                        } else {
                           var23 = true;
                        }
                     case 2:
                     default:
                        break;
                     case 3:
                        if (var3.D() >= 90 && (var3.D() < 225 || var3.D() >= 270)) {
                           var23 = true;
                        } else {
                           var24 = true;
                        }
                     }

                     var21 = var12.d();
                     var22 = var12.e();

                     while(true) {
                        if ((var12.e() > var22 || var22 > var13.e()) && (var12.e() < var22 || var22 < var13.e()) && com.aspose.cells.b.a.zq.a((double)var22) != com.aspose.cells.b.a.zq.a((double)var12.e()) && com.aspose.cells.b.a.zq.a((double)var22) != com.aspose.cells.b.a.zq.a((double)var13.e())) {
                           break label233;
                        }

                        if (var23) {
                           zama.a(var0, var21, var22, var21 + (float)var1.Y(), var22, var1.g());
                        }

                        if (var24) {
                           zama.a(var0, var21 - (float)var1.Y(), var22, var21, var22, var1.g());
                        }

                        boolean var25 = var1.c().S();
                        var21 += var10 * (float)a(var16, a(var1.j(), var1.C(), (int)var1.B(), (int)var1.D(), var25), (int)var1.D(), var25);
                        var22 += var11 * (float)a(var16, a(var1.j(), var1.C(), (int)var1.B(), (int)var1.D(), var25), (int)var1.D(), var25);
                     }
                  }

                  if (var19) {
                     zama.a(var0, var21, var22, var21 + (float)var1.X(), var22, var1.g());
                  }

                  if (var20) {
                     zama.a(var0, var21 - (float)var1.X(), var22, var21, var22, var1.g());
                  }

                  var21 += var10 * (float)a(var16, a(var1.j(), var1.y(), (int)var1.x(), (int)var1.D(), var1.c().S()), (int)var1.D(), var1.c().S());
                  var22 += var11 * (float)a(var16, a(var1.j(), var1.y(), (int)var1.x(), (int)var1.D(), var1.c().S()), (int)var1.D(), var1.c().S());
               }
            }

            if (var2 <= 0) {
               return;
            }

            var5[0].b(var5[0].e() - (float)var2);
            var5[1].b(var5[1].e() - (float)var2);
            var2 = 0;
         }
      }
   }

   static void b(zn var0, zbo var1) throws Exception {
      if (!var1.c().B().D()) {
         zif var2 = var1.c();
         int var3 = var2.M();
         zbvc var4 = var2.N();
         com.aspose.cells.b.a.b.zo[] var5 = zib.c(var2);
         zama.a(var0, var5[0], var5[1], var1.g());
         zbtj var6 = var1.F();
         zbcp var7 = var2.z().c(0);
         zjd var8 = var7.D().b(0);
         String var9 = var8.z();
         boolean var10 = var8.A();
         boolean var11 = false;
         if (var6.h() && var8 != null) {
            var11 = true;
         }

         float var12 = 0.0F;
         var12 = var5[0].e() + (float)var1.X();
         float var13 = (float)((double)var2.N().g() / (var1.z() - var1.D()));
         ArrayList var14 = var1.l;
         double var15 = var1.n() ? zbuk.e(var1.z()) : var1.z();
         double var17 = var1.n() ? zbuk.e(var1.D()) : var1.D();
         double var19 = var1.n() ? zbuk.e(var1.x()) : var1.x();

         for(int var21 = 0; var21 < var1.l.size(); ++var21) {
            double var22 = (Double)var1.l.get(var21);
            double var24 = var1.n() ? zbuk.f(var22) : var22;
            if (var21 - 1 > 0) {
               if (Math.abs(zbuk.a(var22, com.aspose.cells.b.a.ze.g(var14.get(var21 - 1)))) != var19) {
                  continue;
               }
            } else if (var21 + 1 < var14.size() && Math.abs(zbuk.a(var22, com.aspose.cells.b.a.ze.g(var14.get(var21 + 1)))) != var19) {
               continue;
            }

            float var26 = (float)((var22 - var17) / (var15 - var17) * (double)var2.N().g());
            if (!var1.p()) {
               var26 += var5[0].d();
            } else {
               var26 = var5[1].d() - var26;
            }

            if (var1.E() != 3) {
               if (zhz.b(var3)) {
                  var24 /= 100.0D;
                  var9 = "0%";
               }

               String var27 = "";
               var24 = var1.n() ? var24 : var24 * Math.pow(10.0D, var1.Q().f());
               Color var28 = var6.g();
               if (var11) {
                  var27 = zpv.a(var1.c().al(), var24, var9, var10);
                  var28 = zpv.a(var24, var9, var28);
               } else {
                  var27 = a((zbo)var1, (Object)var24);
                  var28 = zpv.a(var24, var6.b(), var28);
               }

               com.aspose.cells.b.a.b.zq var29 = new com.aspose.cells.b.a.b.zq(var26 - var1.f / 2.0F, var12, var1.f, var1.g);
               a(var0, com.aspose.cells.b.a.b.zp.a(var29), var27, var6.d(), var6.a(), var28, 1, 9);
            }
         }

         e(var0, var1);
      }
   }

   private static void e(zn var0, zbo var1) {
      zif var2 = var1.c();
      zbvc var3 = var2.N();
      if ((var1.w() != 2 || var1.A() != 2) && var1.g().e()) {
         com.aspose.cells.b.a.b.zo[] var4 = zib.c(var2);
         boolean var7 = false;
         boolean var8 = false;
         switch(var1.w()) {
         case 0:
            var7 = true;
            var8 = true;
            break;
         case 1:
            var7 = true;
         case 2:
         default:
            break;
         case 3:
            var8 = true;
         }

         com.aspose.cells.b.a.b.zo var5;
         com.aspose.cells.b.a.b.zo var6;
         if (!var1.p()) {
            var5 = var4[0];
            var6 = var4[1];
         } else {
            var5 = var4[1];
            var6 = var4[0];
         }

         float var9 = (float)((double)(var6.d() - var5.d()) / (var1.z() - var1.D()));
         float var10 = var5.d();

         float var11;
         for(var11 = var5.e(); var5.d() <= var10 && var10 <= var6.d() || var5.d() >= var10 && var10 >= var6.d() || com.aspose.cells.b.a.zq.a((double)var10) == com.aspose.cells.b.a.zq.a((double)var5.d()) || com.aspose.cells.b.a.zq.a((double)var10) == com.aspose.cells.b.a.zq.a((double)var6.d()); var10 += var9 * (float)var1.x()) {
            if (var7) {
               zama.a(var0, var10, var11 - (float)var1.X(), var10, var11, var1.g());
            }

            if (var8) {
               zama.a(var0, var10, var11, var10, var11 + (float)var1.X(), var1.g());
            }
         }

         var7 = false;
         var8 = false;
         switch(var1.A()) {
         case 0:
            var7 = true;
            var8 = true;
            break;
         case 1:
            var7 = true;
         case 2:
         default:
            break;
         case 3:
            var8 = true;
         }

         var10 = var5.d();

         for(var11 = var5.e(); var5.d() <= var10 && var10 <= var6.d() || var5.d() >= var10 && var10 >= var6.d() || com.aspose.cells.b.a.zq.a((double)var10) == com.aspose.cells.b.a.zq.a((double)var5.d()) || com.aspose.cells.b.a.zq.a((double)var10) == com.aspose.cells.b.a.zq.a((double)var6.d()); var10 += var9 * (float)var1.B()) {
            if (var7) {
               zama.a(var0, var10, var11 - (float)var1.Y(), var10, var11, var1.g());
            }

            if (var8) {
               zama.a(var0, var10, var11, var10, var11 + (float)var1.Y(), var1.g());
            }
         }

      }
   }

   static void a(zn var0, zbo var1, int var2, com.aspose.cells.b.a.b.zp var3) throws Exception {
      if (!var1.c().B().D()) {
         if (var1.k() == 2) {
            f(var0, var1);
         } else {
            zif var4 = var1.c();
            zbvc var5 = var4.N();
            com.aspose.cells.b.a.b.zo[] var6 = zib.c(var4);
            com.aspose.cells.b.a.b.zo var7 = zib.e(var4);
            double var8;
            if (var4.E().p()) {
               var8 = var4.E().z() - var4.E().l();
            } else {
               var8 = var4.E().l() - var4.E().D();
            }

            int var10 = (int)(var8 / (var4.E().z() - var4.E().D()) * (double)var4.N().g());
            zama.a(var0, var6[0].d(), var6[0].e(), var6[0].d(), var6[0].e() - var4.N().i(), var1.g());
            if (var10 > 0) {
               zama.a(var0, var6[0].d() + (float)var10, var6[0].e(), var6[0].d() + (float)var10, var6[0].e() - var4.N().i(), var1.g());
            }

            if (var1.E() == 2) {
               var6[0].a(var6[0].d() + (float)var10);
            }

            float var11 = 0.0F;
            float var12 = (float)var1.F().k();
            byte var13 = 8;
            var11 = var6[0].d() - var1.i - var12;
            float var14 = var4.N().i() / (float)var2;
            zbtj var15 = var1.F();
            ArrayList var16 = var1.c().z().c();
            boolean var17 = false;
            if (var15.h() && var16.size() > 0) {
               var17 = true;
            }

            String var22;
            for(int var18 = 0; var18 < var2; ++var18) {
               double var20 = (double)((float)var18 * var14);
               var20 += (double)(var14 / 2.0F);
               float var19;
               if (var1.p()) {
                  var19 = (float)((double)(var6[0].e() - var4.N().i()) + var20) - var1.h / 2.0F;
               } else {
                  var19 = (float)((double)var6[0].e() - var20) - var1.h / 2.0F;
               }

               if (var1.E() != 3 && var18 % var1.H() == 0 && var18 < var1.l.size()) {
                  var22 = "";
                  Color var23 = var15.g();
                  if (!var17) {
                     var22 = a(var1, var1.l.get(var18));
                     var23 = zpv.a(var1.l.get(var18), var15.b(), var23);
                  } else {
                     String var24 = "";
                     boolean var25 = false;
                     var24 = var18 < var16.size() ? ((zfo)var16.get(var18)).c() : "";
                     var25 = var18 < var16.size() ? ((zfo)var16.get(var18)).b() : false;
                     var22 = zpv.a(var1.c().al(), var1.l.get(var18), var24, var25);
                     var23 = zpv.a(var1.l.get(var18), var24, var23);
                  }

                  com.aspose.cells.b.a.b.zq var30 = new com.aspose.cells.b.a.b.zq(var11, var19, var1.i, var1.h);
                  a(var0, com.aspose.cells.b.a.b.zp.a(var30), var22, var15.d(), var15.a(), var23, var13, 1);
               }
            }

            b(var0, var1, var10, var2);
            boolean var27 = var4.E().p();
            ArrayList[] var28 = var4.z().e();
            if (var28 != null && var28.length > 0 && var16.size() > 0 && var1.E() != 3) {
               ArrayList var29 = var28[0];
               zfo var21 = (zfo)var29.get(0);
               var22 = zpv.a(var1.c().al(), var21.a(), var21.c(), var21.b());
               zbsp.a(var1.c().ap(), var22, 0, var15.a(), (com.aspose.cells.b.a.b.zt)(new com.aspose.cells.b.a.b.zt((float)var3.e(), (float)var3.f())), 1, 1);
               float var31 = 0.0F;
               if (!var1.p()) {
                  var31 = var6[0].e();
               } else {
                  var31 = var6[0].e() - var4.N().i();
               }

               var11 = var6[0].d() - var12 * (float)(var28.length + 1) - var1.f;
               float var32 = var6[0].d();
               boolean var26 = true;
               a(var0, var28, var26, var1, var15, (double)var14, var3, var12, var32, var11, var31);
            }

         }
      }
   }

   private static void f(zn var0, zbo var1) throws Exception {
      zif var2 = var1.c();
      zbvc var3 = var2.N();
      com.aspose.cells.b.a.b.zo[] var4 = zib.c(var2);
      com.aspose.cells.b.a.b.zo var5 = zib.e(var2);
      double var6;
      if (var2.E().p()) {
         var6 = var2.E().z() - var2.E().l();
      } else {
         var6 = var2.E().l() - var2.E().D();
      }

      int var8 = (int)(var6 / (var2.E().z() - var2.E().D()) * (double)var2.N().g());
      zama.a(var0, var4[0].d(), var4[0].e(), var4[0].d(), var4[0].e() - var2.N().i(), var1.g());
      if (var8 > 0) {
         zama.a(var0, var4[0].d() + (float)var8, var4[0].e(), var4[0].d() + (float)var8, var4[0].e() - var2.N().i(), var1.g());
      }

      if (var1.E() == 2) {
         var4[0].a(var4[0].d() + (float)var8);
      }

      ArrayList var9 = var1.l;
      float var10 = 0.0F;
      float var11 = (float)var1.F().k();
      float var12 = var1.g / 2.0F;
      byte var13 = 8;
      var10 = var4[0].d() - var1.f - var11;
      zbtj var14 = var1.F();
      ArrayList var15 = var1.c().z().c();
      int var16 = (int)var1.z();
      int var17 = (int)var1.D();
      int var18 = var1.j();
      int var19 = a(var18, var16, var17, var1.c().S()) + 1;
      float var20 = var3.i() / (float)var19;

      for(int var21 = 0; var21 < var9.size(); ++var21) {
         int var22 = com.aspose.cells.b.a.zo.a(com.aspose.cells.b.a.zr.a(var1.l.get(var21)));
         int var23 = a(var18, var22, var17, var1.c().S());
         float var24 = var20 * (float)var23;
         var24 += var20 / 2.0F;
         float var25;
         if (var1.p()) {
            var25 = var4[0].e() - var2.N().i() + var24;
         } else {
            var25 = var4[0].e() - var24;
         }

         if (var1.E() != 3 && var21 % var1.H() == 0 && var21 < var1.l.size()) {
            String var26 = "";
            Color var27 = var14.g();
            var26 = a((zbo)var1, (Object)var22);
            var27 = zpv.a(var22, var14.b(), var27);
            if (var14.h() && var2.z().b) {
               String var28 = "";
               boolean var29 = false;
               Iterator var30 = var15.iterator();

               while(var30.hasNext()) {
                  zfo var31 = (zfo)var30.next();
                  if (zhz.a(var31.a(), var2.S()) == com.aspose.cells.b.a.ze.f(var22)) {
                     var28 = var31.c();
                     var29 = var31.b();
                     var26 = zpv.a(var1.c().al(), var22, var28, var29);
                     var27 = zpv.a(var22, var28, var27);
                     break;
                  }
               }
            }

            com.aspose.cells.b.a.b.zq var32 = new com.aspose.cells.b.a.b.zq(var10, var25 - var12, var1.f, var1.g);
            a(var0, com.aspose.cells.b.a.b.zp.a(var32), var26, var14.d(), var14.a(), var27, var13, 1);
         }
      }

      a(var0, var8, var1);
   }

   private static void b(zn var0, zbo var1, int var2, int var3) {
      zif var4 = var1.c();
      zbvc var5 = var4.N();
      if ((var1.w() != 2 || var1.A() != 2) && var1.g().e()) {
         com.aspose.cells.b.a.b.zo[] var6 = zib.c(var4);

         while(true) {
            boolean var10 = false;
            boolean var11 = false;
            switch(var1.w()) {
            case 0:
               var10 = true;
               var11 = true;
               break;
            case 1:
               var10 = true;
            case 2:
            default:
               break;
            case 3:
               var11 = true;
            }

            boolean var12 = false;
            boolean var13 = false;
            switch(var1.A()) {
            case 0:
               var12 = true;
               var13 = true;
               break;
            case 1:
               var12 = true;
            case 2:
            default:
               break;
            case 3:
               var13 = true;
            }

            com.aspose.cells.b.a.b.zo var8;
            com.aspose.cells.b.a.b.zo var9;
            if (var1.p()) {
               var8 = new com.aspose.cells.b.a.b.zo(var6[0].d(), var6[0].e() - var5.i());
               var9 = new com.aspose.cells.b.a.b.zo(var6[0].d(), var6[0].e());
            } else {
               var8 = new com.aspose.cells.b.a.b.zo(var6[0].d(), var6[0].e());
               var9 = new com.aspose.cells.b.a.b.zo(var6[0].d(), var6[0].e() - var5.i());
            }

            float var7 = (var9.e() - var8.e()) / (float)var3;
            float var14 = var8.d();

            float var15;
            float var16;
            for(var15 = var8.e(); var8.e() <= var15 && var15 <= var9.e() || var8.e() >= var15 && var15 >= var9.e() || com.aspose.cells.b.a.zq.a((double)var15) == com.aspose.cells.b.a.zq.a((double)var8.e()) || com.aspose.cells.b.a.zq.a((double)var15) == com.aspose.cells.b.a.zq.a((double)var9.e()); var15 += (float)var1.J() * var7) {
               if (var8.e() <= var15 && var15 <= var9.e() || var8.e() >= var15 && var15 >= var9.e() || com.aspose.cells.b.a.zq.a((double)var15) == com.aspose.cells.b.a.zq.a((double)var8.e()) || com.aspose.cells.b.a.zq.a((double)var15) == com.aspose.cells.b.a.zq.a((double)var9.e())) {
                  if (var10) {
                     zama.a(var0, var14, var15, var14 + (float)var1.X(), var15, var1.g());
                  }

                  if (var11) {
                     zama.a(var0, var14 - (float)var1.X(), var15, var14, var15, var1.g());
                  }
               }

               var16 = var15 - (float)var1.J() * var7 / 2.0F;
               if (var8.e() <= var16 && var16 <= var9.e() || var8.e() >= var16 && var16 >= var9.e() || com.aspose.cells.b.a.zq.a((double)var16) == com.aspose.cells.b.a.zq.a((double)var8.e()) || com.aspose.cells.b.a.zq.a((double)var16) == com.aspose.cells.b.a.zq.a((double)var9.e())) {
                  if (var12) {
                     zama.a(var0, var14, var16, var14 + (float)var1.X(), var16, var1.g());
                  }

                  if (var13) {
                     zama.a(var0, var14 - (float)var1.X(), var16, var14, var16, var1.g());
                  }
               }
            }

            if ((float)var1.J() * var7 > var9.e() - var8.e()) {
               var16 = var15 - (float)var1.J() * var7 / 2.0F;
               if (var8.e() <= var16 && var16 <= var9.e() || var8.e() >= var16 && var16 >= var9.e() || com.aspose.cells.b.a.zq.a((double)var16) == com.aspose.cells.b.a.zq.a((double)var8.e()) || com.aspose.cells.b.a.zq.a((double)var16) == com.aspose.cells.b.a.zq.a((double)var9.e())) {
                  if (var12) {
                     zama.a(var0, var14, var16, var14 + (float)var1.X(), var16, var1.g());
                  }

                  if (var13) {
                     zama.a(var0, var14 - (float)var1.X(), var16, var14, var16, var1.g());
                  }
               }
            }

            if (var2 <= 0) {
               return;
            }

            var6[0].a(var6[0].d() + (float)var2);
            var2 = 0;
         }
      }
   }

   private static void a(zn var0, int var1, zbo var2) {
      zif var3 = var2.c();
      zbvc var4 = var3.N();
      if ((var2.w() != 2 || var2.A() != 2) && var2.g().e()) {
         com.aspose.cells.b.a.b.zo[] var5 = zib.c(var3);

         while(true) {
            boolean var8 = false;
            boolean var9 = false;
            switch(var2.w()) {
            case 0:
               var8 = true;
               var9 = true;
               break;
            case 1:
               var8 = true;
            case 2:
            default:
               break;
            case 3:
               var9 = true;
            }

            com.aspose.cells.b.a.b.zo var6;
            com.aspose.cells.b.a.b.zo var7;
            if (var2.p()) {
               var6 = new com.aspose.cells.b.a.b.zo(var5[0].d(), var5[0].e() - var4.i());
               var7 = new com.aspose.cells.b.a.b.zo(var5[0].d(), var5[0].e());
            } else {
               var6 = new com.aspose.cells.b.a.b.zo(var5[0].d(), var5[0].e());
               var7 = new com.aspose.cells.b.a.b.zo(var5[0].d(), var5[0].e() - var4.i());
            }

            int var12 = var2.j();
            double var10;
            if (var2.d() == 0 && var2.k() == 2) {
               var10 = (double)(a(var12, (int)var2.z(), (int)var2.D(), var2.c().S()) + 1);
            } else {
               var10 = var2.z() - var2.D();
            }

            float var13 = (float)((double)(var7.e() - var6.e()) / var10);
            float var14 = var6.d();

            float var15;
            for(var15 = var6.e(); var6.e() <= var15 && var15 <= var7.e() || var6.e() >= var15 && var15 >= var7.e() || com.aspose.cells.b.a.zq.a((double)var15) == com.aspose.cells.b.a.zq.a((double)var6.e()) || com.aspose.cells.b.a.zq.a((double)var15) == com.aspose.cells.b.a.zq.a((double)var7.e()); var15 += var13 * (float)a(var12, a(var2.j(), var2.y(), (int)var2.x(), (int)var2.D(), var2.c().S()), (int)var2.D(), var2.c().S())) {
               if (var8) {
                  zama.a(var0, var14, var15, var14 + (float)var2.X(), var15, var2.g());
               }

               if (var9) {
                  zama.a(var0, var14 - (float)var2.X(), var15, var14, var15, var2.g());
               }
            }

            boolean var16 = false;
            boolean var17 = false;
            switch(var2.A()) {
            case 0:
               var16 = true;
               var17 = true;
               break;
            case 1:
               var16 = true;
            case 2:
            default:
               break;
            case 3:
               var17 = true;
            }

            var14 = var6.d();

            for(var15 = var6.e(); var6.e() <= var15 && var15 <= var7.e() || var6.e() >= var15 && var15 >= var7.e() || com.aspose.cells.b.a.zq.a((double)var15) == com.aspose.cells.b.a.zq.a((double)var6.e()) || com.aspose.cells.b.a.zq.a((double)var15) == com.aspose.cells.b.a.zq.a((double)var7.e()); var15 += var13 * (float)a(var12, a(var2.j(), var2.C(), (int)var2.B(), (int)var2.D(), var2.c().S()), (int)var2.D(), var2.c().S())) {
               if (var16) {
                  zama.a(var0, var14, var15, var14 + (float)var2.Y(), var15, var2.g());
               }

               if (var17) {
                  zama.a(var0, var14 - (float)var2.Y(), var15, var14, var15, var2.g());
               }
            }

            if (var1 <= 0) {
               return;
            }

            var5[0].a(var5[0].d() + (float)var1);
            var1 = 0;
         }
      }
   }

   static void c(zn var0, zbo var1) throws Exception {
      if (!var1.c().B().D()) {
         zif var2 = var1.c();
         zbvc var3 = var2.N();
         com.aspose.cells.b.a.b.zo[] var4 = zib.d(var2);
         zbo var5 = var2.E();
         double var6 = var5.S();
         double var8 = var5.T();
         double var10 = var5.U();
         boolean var12 = false;
         if (var5.D() == var5.l()) {
            var12 = true;
         }

         if (var5.p()) {
            var10 = var6 - var10;
         } else {
            var10 -= var8;
         }

         int var13 = (int)(var10 / (var6 - var8) * (double)var2.N().i());
         if (var13 != 0) {
            zama.a(var0, var4[0].d(), var4[0].e() - (float)var13, var4[1].d(), var4[1].e() - (float)var13, var1.g());
         }

         if (var2.p() >= 0) {
            zama.a(var0, var4[0].d(), var4[0].e(), var4[1].d(), var4[1].e(), var1.g());
         }

         if (var1.E() == 2) {
            var4[0].b(var4[0].e() - (float)var13);
            var4[1].b(var4[1].e() - (float)var13);
         }

         zbcr var14 = var2.z();
         zbtj var15 = var1.F();
         ArrayList var16 = var2.z().c();
         float var17 = (float)var1.F().k();
         double var18 = var4[1].d() == var4[0].d() ? 1.5707963267948966D : Math.atan((double)Math.abs((var4[0].e() - var4[1].e()) / (var4[1].d() - var4[0].d())));
         int var20 = zbuk.c(180.0D * var18 / 3.141592653589793D);
         boolean var21 = false;
         if (var20 <= a) {
            var21 = true;
         }

         float var22 = (var4[1].d() - var4[0].d()) / (float)var1.l.size();
         float var23 = (var4[1].e() - var4[0].e()) / (float)var1.l.size();
         boolean var24 = true;
         boolean var25 = true;

         for(int var26 = 0; var26 < var1.l.size(); ++var26) {
            int var27 = var26;
            if (var1.p()) {
               var27 = var1.l.size() - 1 - var26;
            }

            String var28 = "";
            var28 = a(var1, var1.l.get(var27));
            if (var1.E() != 3 && var27 % var1.H() == 0) {
               com.aspose.cells.b.a.b.zq var29 = com.aspose.cells.b.a.b.zq.c();
               byte var31 = 1;
               byte var32 = 1;
               float var30;
               if (var2.p() >= 0) {
                  if (var4[0].e() == var4[1].e()) {
                     if (var22 == 0.0F) {
                        var29.a(var4[0].d() + var17);
                        var29.b(var4[0].e() - var1.g / 2.0F);
                        var32 = 9;
                     } else {
                        var29.a(var4[0].d() + (float)var26 * var22 + var22 / 2.0F - var1.f / 2.0F);
                        var29.b(var4[0].e() + var17);
                        var32 = 9;
                     }

                     var29.c(var1.f);
                     var29.d(var1.g);
                  } else if (var21) {
                     var29.a(var4[0].d() + (float)var26 * var22 + var22 / 2.0F - var1.f / 2.0F);
                     var29.b(var4[0].e() + (float)var26 * var23 + var23 / 2.0F);
                     var29.b(var29.g() + var17);
                     var32 = 9;
                     var29.c(var1.f);
                     var29.d(var1.g);
                  } else {
                     var30 = (float)((double)(var1.g / 2.0F) / Math.tan(var18) + (double)var17 / Math.sin(var18));
                     if (var22 > 0.0F && var23 > 0.0F) {
                        var29.a(var4[0].d() + (float)var26 * var22 + var22 / 2.0F - var30 - var1.f);
                        var31 = 8;
                     } else if (var22 < 0.0F && var23 > 0.0F) {
                        var29.a(var4[0].d() + (float)var26 * var22 + var22 / 2.0F + var30);
                        var31 = 7;
                     } else if (var22 < 0.0F && var23 < 0.0F) {
                        var29.a(var4[0].d() + (float)var26 * var22 + var22 / 2.0F - var30 - var1.f);
                        var31 = 8;
                     } else {
                        var29.a(var4[0].d() + (float)var26 * var22 + var22 / 2.0F + var30);
                        var31 = 7;
                     }

                     var29.b(var4[0].e() + (float)var26 * var23 + var23 / 2.0F - var1.g / 2.0F);
                     var29.c(var1.f);
                     var29.d(var1.g);
                  }
               } else if (var2.p() < 0 && !var12 && var1.E() == 2) {
                  if (var4[0].e() == var4[1].e()) {
                     var29.a(var4[0].d() + (float)var26 * var22 + var22 / 2.0F - var1.f / 2.0F);
                     var29.b(var4[0].e() - var1.g - var17);
                     var29.c(var1.f);
                     var29.d(var1.g);
                  } else if (var21) {
                     var29.a(var4[0].d() + (float)var26 * var22 + var22 / 2.0F - var1.f / 2.0F);
                     var29.b(var4[0].e() + (float)var26 * var23 + var23 / 2.0F);
                     var29.b(var29.g() - var17);
                     var29.b(var29.g() - var1.g);
                     var32 = 0;
                     var29.c(var1.f);
                     var29.d(var1.g);
                  } else {
                     var30 = (float)((double)(var1.g / 2.0F) / Math.tan(var18) + (double)var17 / Math.sin(var18));
                     if (var22 > 0.0F && var23 < 0.0F) {
                        var29.a(var4[0].d() + (float)var26 * var22 + var22 / 2.0F - var30 - var1.f);
                        var31 = 8;
                     } else if (var22 < 0.0F && var23 < 0.0F) {
                        var29.a(var4[0].d() + (float)var26 * var22 + var30);
                        var31 = 7;
                     } else if (var22 < 0.0F && var23 > 0.0F) {
                        var29.a(var4[0].d() + (float)var26 * var22 + var22 / 2.0F - var1.f - var30);
                        var31 = 8;
                     } else {
                        var29.a(var4[0].d() + (float)var26 * var22 + var22 / 2.0F + var30);
                        var31 = 7;
                     }

                     var29.b(var4[0].e() + (float)var26 * var23 + var23 / 2.0F - var1.g / 2.0F);
                     var29.c(var1.f);
                     var29.d(var1.g);
                  }
               }

               if (!var29.n() && var29.h() > 0.0F && var29.i() > 0.0F) {
                  a(var0, com.aspose.cells.b.a.b.zp.a(var29), var28, var15.d(), var15.a(), var15.g(), var31, var32);
               }
            }
         }

         a(var0, var1, var13, var1.l.size());
      }
   }
}
